public class StringUtils extends Object
| 构造器和说明 |
|---|
StringUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
defaultString(String value) |
static boolean |
equals(String str1,
String str2) |
static boolean |
isBlank(String str) |
static boolean |
isEmpty(String str) |
static boolean |
isNotBlank(String str) |
static boolean |
isNotEmpty(String str) |
static String |
replace(String text,
String searchString,
String replacement) |
static String |
replace(String text,
String searchString,
String replacement,
int max)
替换字符串
|
static boolean |
substringMatch(CharSequence str,
int index,
CharSequence substring)
Test whether the given string matches the given substring
at the given index.
|
public static boolean isBlank(String str)
public static boolean isNotBlank(String str)
public static boolean isEmpty(String str)
public static boolean isNotEmpty(String str)
public static String replace(String text, String searchString, String replacement, int max)
text - textsearchString - searchStringreplacement - replacementmax - maxpublic static boolean substringMatch(CharSequence str, int index, CharSequence substring)
str - the original string (or StringBuilder)index - the index in the original string to start matching againstsubstring - the substring to match at the given indexCopyright © 2022. All rights reserved.