StringExtension extension

on

Properties

capitalize String

Available on String, provided by the StringExtension extension

首字母大写
no setter
containsEmoji bool

Available on String, provided by the StringExtension extension

检查是否包含表情符号
no setter
hideEmail String

Available on String, provided by the StringExtension extension

隐藏邮箱
no setter
hidePhoneNumber String

Available on String, provided by the StringExtension extension

隐藏手机号中间四位
no setter
isEmail bool

Available on String, provided by the StringExtension extension

判断字符串是否为邮箱
no setter
isEmptyOrNull bool

Available on String, provided by the StringExtension extension

判断字符串是否为空
no setter
isNotEmptyOrNull bool

Available on String, provided by the StringExtension extension

判断字符串是否不为空
no setter
isPalindrome bool

Available on String, provided by the StringExtension extension

检查是否为回文
no setter
isPhoneNumber bool

Available on String, provided by the StringExtension extension

判断字符串是否为手机号
no setter
isUrl bool

Available on String, provided by the StringExtension extension

判断字符串是否为URL
no setter
removeWhitespace String

Available on String, provided by the StringExtension extension

移除所有空白字符
no setter
reversed String

Available on String, provided by the StringExtension extension

反转字符串
no setter
toCamelCase String

Available on String, provided by the StringExtension extension

驼峰命名转换
no setter

Methods

safeSubstring(int start, [int? end]) String

Available on String, provided by the StringExtension extension

安全的子字符串提取
toBool() bool

Available on String, provided by the StringExtension extension

将字符串转换为bool
toDouble() double?

Available on String, provided by the StringExtension extension

将字符串转换为double
toFixed({int digits = 2, String def = "0.0"}) String

Available on String, provided by the StringExtension extension

小数位格式化
toInt() int?

Available on String, provided by the StringExtension extension

将字符串转换为int