StringUtilsExtension extension
- on
Properties
- count → int
-
统计字符串长度
no setter
-
hasAsset
→ Future<
bool> -
是否包含asset文件
no setter
- isChineseCharacter → bool
-
是否汉字判断
no setter
- isEmail → bool
-
验证是否email格式
no setter
- isEmptyString → bool
-
no setter
- isMobile → bool
-
验证手机号码格式
no setter
- isNotEmptyString → bool
-
no setter
- toInt → int
-
no setter
- toLocalTime → DateTime
-
转成当地时间
no setter
- toNumDouble → double
-
no setter
- withoutExtension → String
-
返回排除后缀名称
no setter
Methods
-
ellipsize(
int length, String endChars, bool isAccurate) → String -
截断字符
text处理文体
length
最大长度(以字符计)endChars
末尾显示字符isAccurate
是否精确统计 -
format(
List< String> args) → String -
isContainsStartsWith(
List< String> params) → bool -
字符串开始是否包含特定字符
params
待比较字符 -
isContainsSub(
List< String> params) → bool -
字符串是否包含特定字符
params
待比较字符数组 -
isInEquals(
List< String> compareValues) → bool -
判断对应的值是否与其中被比较的值相等
compareValues
被比较值 -
substringByStr(
String start, String end) → String - 截取2个字符串之间的字符串
-
verifyLength(
int min, int max) → bool - 验证字符串长度是否在范围内