StrUtils class

create_user: zhengzaihong email:1096877329@qq.com create_date: 2022/7/4 create_time: 17:34 describe: 文本处理工具 text processing tools

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nullToDef(String? value, String def, {String? suffix, bool defSuffix = false}) String
如果为空返回默认值def, defSuffix为true时拼接上后缀 suffix if it is empty, return the default value def, and if defSuffix is true, append the suffix suffix
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

equals(String? a, String? b) bool
检查两个字符串是否相等 Check whether two strings are equal
firstNullToSecond(String? first, String? second, {String def = ''}) String
如果第一项为空则返回第二项, def可选返回默认值 Returns the second item if the first item is empty, def optionally returns the default value
hasAz(String str) bool
【含有英文】true Contains letters true
hasNum(String str) bool
【含有数字】true Contains numbers true
isAz(String str) bool
【全为字母】返回true 否则false All letters Returns true otherwise false
isAzNum(String str) bool
【除字母和数字外无其他字符(只有字母数字的字符串)】返回true 否则false No characters except letters and numbers (only alphanumeric strings) Returns true Otherwise false
isChinese(String str) bool
判断是否为纯中文,不是返回false Determine whether it is pure Chinese, not return false
isEmpty(String? string) bool
检查字符串是否为空 Check whether the string is empty
isNotEmpty(String? string) bool
isNum(String str) bool
【全为数字】返回true All numbers Returns true