Class StringUtils
java.lang.Object
io.micrometer.core.instrument.util.StringUtils
Deprecated.
Utilities for
String.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDeprecated.Check if the String is null or has only whitespaces.static booleanDeprecated.Check if the String is null or empty.static booleanisNotBlank(@Nullable String string) Deprecated.Check if the String has any non-whitespace character.static booleanisNotEmpty(@Nullable String string) Deprecated.Check if the String has any character.static StringDeprecated.Truncate the String to the max length.static StringDeprecated.Truncate the String to the max length and append string to indicate if truncation was applied
-
Method Details
-
isBlank
Deprecated.Check if the String is null or has only whitespaces. Modified fromorg.apache.commons.lang.StringUtils#isBlank(String).- Parameters:
string- String to check- Returns:
trueif the String is null or has only whitespaces
-
isNotBlank
Deprecated.Check if the String has any non-whitespace character.- Parameters:
string- String to check- Returns:
trueif the String has any non-whitespace character
-
isEmpty
Deprecated.Check if the String is null or empty.- Parameters:
string- String to check- Returns:
trueif the String is null or empty
-
isNotEmpty
Deprecated.Check if the String has any character.- Parameters:
string- String to check- Returns:
trueif the String has any character- Since:
- 1.1.0
-
truncate
Deprecated.Truncate the String to the max length.- Parameters:
string- String to truncatemaxLength- max length- Returns:
- truncated String
-
truncate
Deprecated.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
-
StringUtilsinstead.