this interface is used by various functions in this submodule to parse and unparse word tokens of various styles.
it provides the description of your tokens, so that it can be broken down into words, or vice-versa.
here is a list of functions that make use of this interface:
the NamingCaseTuple consists of the following configurable options, as an array:
index 0: specifies the first_letter_upper option: is the first letter an upper case letter?
1 => yes.
-1 => no.
0 => impartial (in other words, it will depend-on/inherit word_first_letter_upper).
index 1: specifies the word_first_letter_upper option: is the first letter of each word an upper case letter?
1 => yes.
-1 => no.
0 => preserve original.
index 2: specifies the rest_word_letters_upper option: are the remaining letters in each word in upper case?
1 => yes.
-1 => no.
0 => preserve original.
index 3: specifies the delimiter option: what is the separator between words in a single token (if any)?
"" => (default) indicates that there's no delimiter character.
so we must rely on letter case change to detect word splitting.
this is what is used for camelCase and PascalCase.
"_" => delimiter is used by snake_case.
"-" => delimiter is used by kebab-case.
string => define a custom delimiter string.
index 4: specifies the prefix option: what is the prefix string (if any)?
index 5: specifies the suffix option: what is the suffix string (if any)?
this interface is used by various functions in this submodule to parse and unparse word tokens of various styles. it provides the description of your tokens, so that it can be broken down into words, or vice-versa.
here is a list of functions that make use of this interface:
the
NamingCaseTuple
consists of the following configurable options, as an array:index
0
: specifies thefirst_letter_upper
option:is the first letter an upper case letter?
1
=> yes.-1
=> no.0
=> impartial (in other words, it will depend-on/inheritword_first_letter_upper
).index
1
: specifies theword_first_letter_upper
option:is the first letter of each word an upper case letter?
1
=> yes.-1
=> no.0
=> preserve original.index
2
: specifies therest_word_letters_upper
option:are the remaining letters in each word in upper case?
1
=> yes.-1
=> no.0
=> preserve original.index
3
: specifies thedelimiter
option:what is the separator between words in a single token (if any)?
""
=> (default) indicates that there's no delimiter character. so we must rely on letter case change to detect word splitting. this is what is used for camelCase and PascalCase."_"
=> delimiter is used by snake_case."-"
=> delimiter is used by kebab-case.string
=> define a custom delimiter string.index
4
: specifies theprefix
option:what is the prefix string (if any)?
index
5
: specifies thesuffix
option:what is the suffix string (if any)?