| Constructor and description |
|---|
StringExtensions() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static String |
joinAndNormalize(String[] self, String separator)The same as a standard join method, but removes any double-ups of
the separator in cases when some parts already contain it. |
|
static String |
joinAndNormalize(List<String> self, String separator)The same as a standard join method, but removes any double-ups of
the separator in cases when some parts already contain it. |
|
static String |
toKebabCase(String self)Convert a string from any of the supported cases to kebab-case. |
|
static String |
toPascalCase(String self)Convert a string from any of the supported cases to PascalCase. |
|
static String |
toSentenceCase(String self, boolean capitalizeEachWord)Convert a string from any of the supported cases to Sentence case,
with an option to capitalize each word in the sentence (so it becomes
Sentence Case). |
The same as a standard join method, but removes any double-ups of
the separator in cases when some parts already contain it. eg:
['/part1/', '/part2'].joinAndNormalize('/') == '/part1/part2'
Useful for things like path segments in URLs or file systems.
The same as a standard join method, but removes any double-ups of
the separator in cases when some parts already contain it. eg:
['/part1/', '/part2'].joinAndNormalize('/') == '/part1/part2'
Useful for things like path segments in URLs or file systems.
Convert a string from any of the supported cases to kebab-case.
Convert a string from any of the supported cases to PascalCase.