StringUtil class

字符串工具类

another Fairy

Constructors

StringUtil()

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

formatDigitPattern(String str, int digit, String pattern, {bool end = false}) String
每隔digit位加pattern
formatMoney(double num, {int digit = 3, String pattern = ','}) String
每隔3三位加逗号
formatMoneyByInt(int num, {int digit = 3, String pattern = ','}) String
每隔3三位加逗号
formatSpace4(String str, {bool end = false}) String
每隔4位加空格
hideNumber(String str, {int start = 3, int end = 7, String replacement = '****'}) String
使用replacement隐藏第startend的位数
isEmpty(String? str, {bool emptyValue = false}) bool
是否为空
isNotEmpty(String? str, {bool emptyValue = false}) bool
是否不为空
reverse(String str) String
字符串反转