Package org.vaadin.miki.util
Class StringTools
java.lang.Object
org.vaadin.miki.util.StringTools
Some general-purpose utils for
Strings.- Since:
- 2022-09-08
- Author:
- miki
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringfirstLetterUppercase(String string) Modifies the text by putting the first character of it to uppercase.static StringhumanReadable(String string) ConvertscamelCaseintoReadable Text.
-
Method Details
-
firstLetterUppercase
Modifies the text by putting the first character of it to uppercase.- Parameters:
string- String.- Returns:
- The input string, but with the first letter being uppercase.
-
humanReadable
ConvertscamelCaseintoReadable Text. Also removes more than two consecutive spaces and trims the result.- Parameters:
string- String.- Returns:
- Human-readable string.
-