public class StringUtils extends Object
Constructor and Description |
---|
StringUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
genKey(String prefix,
String className,
String methodName)
生成key
|
static boolean |
hasLength(CharSequence str) |
static boolean |
hasText(CharSequence str) |
static boolean |
hasText(String str) |
static boolean |
isNotEmpty(String str)
判断字符串是否不为空,不为空则返回true
|
static boolean |
isNullOrEmpty(Object obj)
判断对象或对象数组中每一个对象是否为空: 对象为null,字符序列长度为0,集合类、Map为empty
|
static String |
lineToHump(String str)
下划线转驼峰
|
static int |
parseInt(Object str) |
static int |
parseInt(Object str,
int defaultValue) |
static String |
toStringByObject(Object obj)
Object 对象转换成字符串
|
static String |
toStringByObject(Object obj,
boolean isqdkg,
String datatype)
Object 对象转换成字符串,并可以根据参数去掉两端空格
|
public static final String EMPTY
public static boolean isNotEmpty(String str)
str
- 源数据public static boolean isNullOrEmpty(Object obj)
obj
- public static String toStringByObject(Object obj)
obj
- public static String toStringByObject(Object obj, boolean isqdkg, String datatype)
obj
- public static boolean hasText(CharSequence str)
public static boolean hasLength(CharSequence str)
public static boolean hasText(String str)
public static int parseInt(Object str)
public static int parseInt(Object str, int defaultValue)
Copyright © 2021. All rights reserved.