Class Strings
java.lang.Object
joptsimple.internal.Strings
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisNullOrEmpty(String target) Tells whether the given string is either or consists solely of whitespace characters.static StringGives a string consisting of the string representations of the elements of a given array of objects, each separated by a given separator string.static StringGives a string consisting of the elements of a given array of strings, each separated by a given separator string.static Stringrepeat(char ch, int count) Gives a string consisting of the given character repeated the given number of times.static StringGives a string consisting of a given string prepended and appended with surrounding characters.
-
Field Details
-
EMPTY
- See Also:
-
LINE_SEPARATOR
-
-
Constructor Details
-
Strings
private Strings()
-
-
Method Details
-
repeat
Gives a string consisting of the given character repeated the given number of times.- Parameters:
ch- the character to repeatcount- how many times to repeat the character- Returns:
- the resultant string
-
isNullOrEmpty
Tells whether the given string is either or consists solely of whitespace characters.- Parameters:
target- string to check- Returns:
trueif the target string is null or empty
-
surround
-
join
-
join
Gives a string consisting of the string representations of the elements of a given array of objects, each separated by a given separator string.- Parameters:
pieces- the elements whose string representations are to be joinedseparator- the separator- Returns:
- the joined string
-