|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjoptsimple.internal.Strings
public final class Strings
Field Summary | |
---|---|
static java.lang.String |
EMPTY
|
static java.lang.String |
LINE_SEPARATOR
|
static java.lang.String |
SINGLE_QUOTE
|
Method Summary | |
---|---|
static boolean |
isNullOrEmpty(java.lang.String target)
Tells whether the given string is either or consists solely of
whitespace characters. |
static java.lang.String |
join(java.util.List<java.lang.String> pieces,
java.lang.String separator)
Gives a string consisting of the string representations of the elements of a given array of objects, each separated by a given separator string. |
static java.lang.String |
join(java.lang.String[] pieces,
java.lang.String separator)
Gives a string consisting of the elements of a given array of strings, each separated by a given separator string. |
static java.lang.String |
repeat(char ch,
int count)
Gives a string consisting of the given character repeated the given number of times. |
static java.lang.String |
surround(java.lang.String target,
char begin,
char end)
Gives a string consisting of a given string prepended and appended with surrounding characters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EMPTY
public static final java.lang.String SINGLE_QUOTE
public static final java.lang.String LINE_SEPARATOR
Method Detail |
---|
public static java.lang.String repeat(char ch, int count)
Gives a string consisting of the given character repeated the given number of times.
ch
- the character to repeatcount
- how many times to repeat the character
public static boolean isNullOrEmpty(java.lang.String target)
Tells whether the given string is either or consists solely of
whitespace characters.
target
- string to check
true
if the target string is null or emptypublic static java.lang.String surround(java.lang.String target, char begin, char end)
Gives a string consisting of a given string prepended and appended with surrounding characters.
target
- a stringbegin
- character to prependend
- character to append
public static java.lang.String join(java.lang.String[] pieces, java.lang.String separator)
pieces
- the strings to joinseparator
- the separator
public static java.lang.String join(java.util.List<java.lang.String> pieces, java.lang.String separator)
pieces
- the elements whose string representations are to be joinedseparator
- the separator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |