Documentation ¶
Overview ¶
Package camel implements camel case word splitting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Split ¶
Split returns a slice of strings split according to camel case rules. The string is split so that words start with a leading capital unless it is the first word in the string, which may start with a lower case. The underscore character breaks words and numbers are separated from words. Invalid UTF-8 encoded strings are not split.
Types ¶
type Splitter ¶
type Splitter struct {
// contains filtered or unexported fields
}
Splitter implements camel case word splitting with additional control over word boundaries where case-sensitive known words can be provided. The zero value of Splitter can be used and Splitter{}.Split is the equivalent of Split.
func NewSplitter ¶
NewSplitter returns a new camel case splitter using the provided known words. The words should be provided in order of checking priority.