TextUtil class

Text Util.

Constructors

TextUtil()

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

formatComma3(Object num) String
每隔3三位加逗号 num 数字或数字字符串。int型。
formatDigitPattern(String text, {int digit = 4, String pattern = ' '}) String
每隔 x位 加 pattern
formatDigitPatternEnd(String text, {int digit = 4, String pattern = ' '}) String
每隔 x位 加 pattern, 从末尾开始
formatDoubleComma3(Object num, {int digit = 3, String pattern = ','}) String
每隔3三位加逗号 num 数字或数字字符串。double型。
formatSpace4(String text) String
每隔4位加空格
hideNumber(String phoneNo, {int start = 3, int end = 7, String replacement = '****'}) String
hideNumber
isEmpty(String? text) bool
isEmpty
maskName(String name) String
姓名脱敏
replace(String text, Pattern from, String replace) String
replace
reverse(String text) String
reverse
split(String text, Pattern pattern) List<String>
split
toFixed(dynamic value, {int digits = 2, String def = "0"}) String
toFixed