Class StringUtils
java.lang.Object
io.micrometer.common.util.StringUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCheck if the String is null or has only whitespaces.static booleanCheck if the String is null or empty.static booleanisNotBlank(@Nullable String string) Check if the String has any non-whitespace character.static booleanisNotEmpty(@Nullable String string) Check if the String has any character.static StringTruncate the String to the max length.static StringTruncate the String to the max length and append string to indicate if truncation was applied
-
Method Details
-
isBlank
-
isNotBlank
-
isEmpty
-
isNotEmpty
-
truncate
-
truncate
Truncate the String to the max length and append string to indicate if truncation was applied- Parameters:
string- String to truncatemaxLength- max length, which includes the length required fortruncationIndicatortruncationIndicator- A string that is appended ifstringis truncated- Returns:
- truncated String
-