TransformUtils class
转化工具类
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
-
camelCase(
String s) → String? - Camelcase string Example: your name => yourName
-
capitalize(
String s, {bool firstOnly = false}) → String? -
Capitalize each word inside string
字符串内的每个单词都要大写
Example: your name => Your Name, your name => Your name
If First Only is
true
, the only letter get uppercase is the first letter -
capitalizeFirst(
String s) → String? - Uppercase first letter inside string and let the others lowercase 字符串的首字母大写,其他字母小写 Example: your name => Your name
-
fromBinary(
String binaryStr) → int? - Transform binary to int value 转换二进制为int值 Example: 1111 => 15
-
numericOnly(
String s, {bool firstWordOnly = false}) → String - Extract numeric value of string 提取字符串的数值 Example: OTP 12312 27/04/2020 => 1231227042020ß If firstword only is true, then the example return is "12312" (first found numeric word)
-
removeAllWhitespace(
String s) → String? - Remove all whitespace inside string 删除字符串内的所有空格 Example: your name => yourname
-
toBinary(
int i) → String - Transform int value to binary 转换int值为二进制 Example: 15 => 1111
-
toBinaryInt(
int i) → int - Transform int value to binary 转换int值为二进制 Example: 15 => 1111