StringUtil class
字符串工具类
another Fairy
Constructors
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
-
equalsIgnoreCase(
String? strA, String? strB) → bool - 是否相等,忽略大小写
-
formatDigitPattern(
String str, int digit, String pattern, {bool end = false, bool repeat = true}) → 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 = 0, int? end, String replacement = '*'}) → String -
使用
replacement
隐藏第start
到end
的位数 -
isEmpty(
String? str, {bool emptyValue = false}) → bool - 是否为空
-
isNotEmpty(
String? str, {bool emptyValue = false}) → bool - 是否不为空
-
reverse(
String str) → String - 字符串反转