public class StringUtils extends Object
| 构造器和说明 |
|---|
StringUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
bytes(String value)
字符串转为字节数组
|
static boolean |
equals(String one,
String theOther)
比较两个非空(不是null,不是空串、不是空白)字符串是否"相等"
|
static boolean |
equals(String one,
String theOther,
boolean escapeSpace,
boolean ignoreCase)
比较两个字符串是否 "相等"
|
static String |
getNewUUID()
获取一个UUID
|
static boolean |
isBlank(String str)
判断字符串是否为空(null或空字符串)
|
static boolean |
isNotBlank(String str)
判断字符串是否不为空(null或空字符串)
|
static boolean |
isNotNull(String str)
判断字符串是否不为null
|
static boolean |
isNull(String str)
判断字符串是否为null
|
static boolean |
isNuls(String str)
匹配是否是nuls
验证是大于0的数(包括小数, 小数点后有效位超过8位则不合法)
|
static boolean |
isNumber(String str)
是否为数字
|
static boolean |
isNumberGtZero(String str)
验证是大于0的数(包含小数,不限位数)
|
static boolean |
isNumberGtZeroLimitTwo(String str)
验证是大于0的数(包括小数, 小数点后有效位超过2位则不合法)
|
static boolean |
isNumeric(String str)
是否为正整数
|
static String |
strTrim(String str)
去掉字符串前后空格+验证是否为null
|
public static boolean isBlank(String str)
str - 字符串public static boolean isNull(String str)
str - 字符串public static boolean isNotBlank(String str)
str - 字符串public static boolean isNotNull(String str)
str - 字符串public static String getNewUUID()
public static boolean isNumeric(String str)
str - 字符串public static boolean isNumber(String str)
str - 字符串public static boolean isNumberGtZero(String str)
str - 字符串public static boolean isNuls(String str)
str - 字符串public static boolean isNumberGtZeroLimitTwo(String str)
str - 字符串public static byte[] bytes(String value)
value - 字符串public static boolean equals(String one, String theOther)
one - 第一个需要比较的字符串theOther - 另一个参与比较的字符串Copyright © 2021. All rights reserved.