ExtensionString extension

String 扩展

on

Properties

fromHex Color
Format: 'aabbcc' or 'ffaabbcc' with an optional leading '#'.
no setter
isChinaPhone bool
手机号验证
no setter
isChinese bool
是否包含中文
no setter
isDigit bool
Check whether a string is digit or not
no setter
isEmail bool
验证邮箱
no setter
isJsonDecode bool
Check if string is json decode
no setter
isLetter bool
是否是小数
no setter
isNumber bool
Check whether a string is a number or not
no setter
parseDateTime DateTime
no setter
parseDouble double
no setter
parseInt int
no setter
parseNum num
no setter
removeFirst String
Removes first element
no setter
removeLast String
Removes last element
no setter
reverse String
reverse
no setter
toClipboard Future<void>
复制到粘贴板
no setter
toDecodeBase64 String
Base64解密
no setter
toEncodeBase64 String
Base64加密
no setter
tryParseDateTime DateTime?
no setter
tryParseDouble double?
no setter
tryParseInt int?
no setter
tryParseNum num?
no setter
utf8Encode List<int>
进行utf8编码
no setter
utf8ToList List<int>
utf8ToList
no setter

Methods

formatDigitPattern({int digit = 4, String pattern = ' '}) String
每隔 x位 加 pattern
formatDigitPatternEnd(String text, {int digit = 4, String pattern = ' '}) String
每隔 x位 加 pattern, 从末尾开始
insert(int index, String element) String
removePrefix(String prefix) String
移出头部指定 prefix 不包含不移出
removePrefixLength(int i) String
移出头部指定长度
removeSuffix(String suffix) String
移出尾部指定 suffix 不包含不移出
removeSuffixLength(int i) String
移出尾部指定长度