Class StringUtils
java.lang.Object
io.micrometer.core.instrument.util.StringUtils
Deprecated.
Utilities for
String
.-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Deprecated.Check if the String is null or has only whitespaces.static boolean
Deprecated.Check if the String is null or empty.static boolean
isNotBlank
(String string) Deprecated.Check if the String has any non-whitespace character.static boolean
isNotEmpty
(String string) Deprecated.Check if the String has any character.static String
Deprecated.Truncate the String to the max length.static String
Deprecated.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:
true
if 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:
true
if the String has any non-whitespace character
-
isEmpty
Deprecated.Check if the String is null or empty.- Parameters:
string
- String to check- Returns:
true
if the String is null or empty
-
isNotEmpty
Deprecated.Check if the String has any character.- Parameters:
string
- String to check- Returns:
true
if 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 fortruncationIndicator
truncationIndicator
- A string that is appended ifstring
is truncated- Returns:
- truncated String
-
StringUtils
instead.