Class StringUtils
java.lang.Object
cool.scx.common.util.StringUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String联接字符串 但是不连接空static booleanendsWithIgnoreCase(String str, String suffix) endWith (忽略大小写)static boolean校验字符串是否为 null 或全为空白 (空格 " ")static boolean校验字符串是否为 null 或为空字符串 ("")static boolean校验字符串是否不为 null 且不全为空白 (空格 " ")static boolean校验字符串是否不为 null 并且不为空字符串 ("")static StringremoveQuotes(String str) static String创建重复字符串 (带分隔符) 拓展了String.repeat(int)无法添加分隔符的功能static String[]将字符串拆分为字符 (按照码点拆分, 可正确处理 emoji)static booleanstartsWithIgnoreCase(String str, String prefix) startsWith (忽略大小写)
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
repeat
创建重复字符串 (带分隔符) 拓展了String.repeat(int)无法添加分隔符的功能- Parameters:
str- 源字符串delimiter- 分隔符count- 重复次数- Returns:
- 结果
-
notBlank
校验字符串是否不为 null 且不全为空白 (空格 " ")- Parameters:
str- 待检查的字符串- Returns:
- a boolean.
-
isBlank
-
notEmpty
校验字符串是否不为 null 并且不为空字符串 ("")- Parameters:
str- s- Returns:
- s
-
isEmpty
-
startsWithIgnoreCase
-
endsWithIgnoreCase
-
concat
-
split
-
removeQuotes
-