public class StringUtil extends Object
| 构造器和说明 |
|---|
StringUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
contains(String s,
String text,
String delimiter) |
static int |
count(String s,
String text) |
static String |
decodeString(String str)
Decode a string using Base64 encoding.
|
static String |
encodePassword(String password,
String algorithm)
Encode a string using algorithm specified in web.xml and return the
resulting encrypted password.
|
static String |
encodeString(String str)
Encode a string using Base64 encoding.
|
static String |
getPassword(int length) |
static String |
getPassword(int length,
String key) |
static String |
merge(String[] array,
String delimiter) |
static String |
read(ClassLoader classLoader,
String name) |
static String |
read(InputStream is) |
static String |
remove(String s,
String remove,
String delimiter) |
static String |
replace(String s,
String[] oldSubs,
String[] newSubs) |
static String |
replace(String s,
String oldSub,
String newSub) |
static String |
reverse(String s) |
static String |
shorten(String s) |
static String |
shorten(String s,
int length) |
static String |
shorten(String s,
int length,
String suffix) |
static String |
shorten(String s,
String suffix) |
static String[] |
split(String s,
String delimiter) |
static boolean[] |
split(String s,
String delimiter,
boolean x) |
static double[] |
split(String s,
String delimiter,
double x) |
static float[] |
split(String s,
String delimiter,
float x) |
static int[] |
split(String s,
String delimiter,
int x) |
static long[] |
split(String s,
String delimiter,
long x) |
static short[] |
split(String s,
String delimiter,
short x) |
static String |
stackTrace(Throwable t) |
static boolean |
startsWith(String s,
char begin) |
static boolean |
startsWith(String s,
String begin) |
static String |
wrap(String text) |
static String |
wrap(String text,
int width) |
public static String read(ClassLoader classLoader, String name) throws IOException
IOExceptionpublic static String read(InputStream is) throws IOException
IOExceptionpublic static boolean startsWith(String s, char begin)
public static String getPassword(int length)
public static String encodePassword(String password, String algorithm)
password - Password or other credentials to use in authenticating this
usernamealgorithm - Algorithm used to do the digestpublic static String encodeString(String str)
str - Copyright © 2018. All rights reserved.