IDKitString extension

Extend the string class.

on

Methods

isAllNumber() bool
Verify whether it is a string composed of 0-9.
isChineseCharacters() bool
Verify that the string is all Chinese characters.
isIDCard() bool
ID card verification.
isPhoneNumber() bool
Verify that the string is a qualified phone number. Note: Except for IoT cards and data cards.
keepFractionDigits(int fractionDigits, {bool round = true}) String
Convert a number string to a string with specified decimal places. fractionDigits : Number of decimal places. round : Carry processing, default true carry , false no carry.
thousands() String
Amount formatted in thousandths.
toDouble() double
toInt() int
String to numeric value.
toList({int? lengthSplit, Pattern? patternSplit}) List<String>
Convert string to collection. lengthSplit Split string by length. patternSplit Split the string according to the specified pattern. Note: lengthSplit has higher priority than patternSplit.
trimAll() String
Remove all spaces in the string.