Package org.gradle.docs.internal
Class StringUtils
java.lang.Object
org.gradle.docs.internal.StringUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcapitalize(String s) Capitalizes the first letter of the string.static StringLiketoSnakeCase(String), except separated by hyphens.static StringCapitalizes every word in a string, removes all spaces and joins them together as one identifier.static StringSplits a string based on uppercase letters and rejoins them with underscores and makes the identifier lowercase.static StringCapitalizes every word in a string.static StringMakes the first letter of the string lowercase.
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
capitalize
Capitalizes the first letter of the string. example to Example- Parameters:
s- the string- Returns:
- transformed string
-
uncapitalize
Makes the first letter of the string lowercase. Example to example- Parameters:
s- the string- Returns:
- transformed string
-
toTitleCase
Capitalizes every word in a string. this is an example to This Is An Example- Parameters:
s- the string- Returns:
- transformed string
-
toLowerCamelCase
Capitalizes every word in a string, removes all spaces and joins them together as one identifier. This is like a conventional Java identifier. this is an example to thisIsAnExample- Parameters:
s- the string- Returns:
- transformed string
-
toSnakeCase
Splits a string based on uppercase letters and rejoins them with underscores and makes the identifier lowercase. ThisIsAnExample to this_is_an_example- Parameters:
s- the string- Returns:
- transformed string
-
toKebabCase
LiketoSnakeCase(String), except separated by hyphens. ThisIsAnExample to This-is-an-example- Parameters:
s- the string- Returns:
- transformed string
-