程序包 cool.scx.util
类 StringUtils
java.lang.Object
cool.scx.util.StringUtils
String工具类
- 版本:
- 0.0.1
- 作者:
- scx567888
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanendsWithIgnoreCase(String str, String suffix) static boolean校验字符串是否为 null 或全为空白 (空格 " ")static boolean校验字符串是否为 null 或为空字符串 ("")static boolean校验字符串是否不为 null 且不全为空白 (空格 " ")static boolean校验字符串是否不为 null 并且不为空字符串 ("")static String创建重复字符串 (带分隔符) 拓展了String.repeat(int)无法添加分隔符的功能static booleanstartsWithIgnoreCase(String str, String prefix)
-
构造器详细资料
-
StringUtils
public StringUtils()
-
-
方法详细资料
-
repeat
创建重复字符串 (带分隔符) 拓展了String.repeat(int)无法添加分隔符的功能- 参数:
str- 源字符串delimiter- 分隔符count- 重复次数- 返回:
- 结果
-
notBlank
校验字符串是否不为 null 且不全为空白 (空格 " ")- 参数:
str- 待检查的字符串- 返回:
- a boolean.
-
isBlank
校验字符串是否为 null 或全为空白 (空格 " ")- 参数:
str- aObjectobject.- 返回:
- a boolean.
-
notEmpty
校验字符串是否不为 null 并且不为空字符串 ("")- 参数:
str- s- 返回:
- s
-
isEmpty
校验字符串是否为 null 或为空字符串 ("")- 参数:
str- s- 返回:
- s
-
startsWithIgnoreCase
-
endsWithIgnoreCase
-