Package com.vaadin.flow.internal
Class CaseUtil
java.lang.Object
com.vaadin.flow.internal.CaseUtil
Utilities related to various case operations.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcapitalize(String string) Capitalizes the first character in the given string in a way suitable for use in code (methods, properties etc).static StringupperCaseUnderscoreToHumanFriendly(String upperCaseUnderscoreString) Converts an UPPER_CASE_STRING to a human friendly format (Upper Case String).
-
Method Details
-
upperCaseUnderscoreToHumanFriendly
Converts an UPPER_CASE_STRING to a human friendly format (Upper Case String).Splits words on
_. Examples:MY_BEAN_CONTAINER becomes My Bean Container AWESOME_URL_FACTORY becomes Awesome Url Factory SOMETHING becomes Something
- Parameters:
upperCaseUnderscoreString- The input string in UPPER_CASE_UNDERSCORE format- Returns:
- A human friendly version of the input
-
capitalize
Capitalizes the first character in the given string in a way suitable for use in code (methods, properties etc).- Parameters:
string- The string to capitalize- Returns:
- The capitalized string
-