public final class Strings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EMPTY |
static java.lang.String |
LINE_SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static boolean |
isNullOrEmpty(java.lang.String target)
Tells whether the given string is either or consists solely of whitespace characters.
|
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.
|
public static final java.lang.String EMPTY
public static final java.lang.String LINE_SEPARATOR
public static java.lang.String repeat(char ch, int count)
ch
- the character to repeatcount
- how many times to repeat the characterpublic static boolean isNullOrEmpty(java.lang.String target)
target
- string to checktrue
if the target string is null or emptypublic static java.lang.String surround(java.lang.String target, char begin, char end)
target
- a stringbegin
- character to prependend
- character to appendCopyright © 2018. All Rights Reserved.