Package io.bdeploy.common.util
Class StringHelper
java.lang.Object
io.bdeploy.common.util.StringHelper
Helper for
String-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if the string contains only lowercase characters.static booleanReturns whether the given string is null or emptystatic StringReturns a string whose value is the concatenation of this string repeatedcounttimes.
-
Method Details
-
isNullOrEmpty
Returns whether the given string is null or empty -
isAllLowerCase
Checks if the string contains only lowercase characters. -
repeat
Returns a string whose value is the concatenation of this string repeatedcounttimes.If this string is empty or count is zero then the empty string is returned.
This is less efficient than the Java 11 implementation as we cannot reuse the original Strings encoding to fill arrays.
- Parameters:
count- number of times to repeat- Returns:
- A string composed of this string repeated
counttimes or the empty string if this string is empty or count is zero - Throws:
IllegalArgumentException- if thecountis negative.
-