ChineseHelper class
Chinese Helper.
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 Properties
-
chineseMap
→ Map<
String, String> -
final
- chineseRegexp → RegExp
-
final
Static Methods
-
addChineseDict(
List< String> list) → void - 添加繁体字字典
-
containsChinese(
String str) → bool - 判断字符串中是否包含中文 @param str 字符串 @return 包含汉字返回true,否则返回false
-
convertCharToSimplifiedChinese(
String c) → String - 将单个繁体字转换为简体字 @param c 需要转换的繁体字 @return 转换后的简体字
-
convertCharToTraditionalChinese(
String c) → String - 将单个简体字转换为繁体字 @param c 需要转换的简体字 @return 转换后的繁字体
-
convertToSimplifiedChinese(
String str) → String - 将繁体字转换为简体字 @param str 需要转换的繁体字 @return 转换后的简体字
-
convertToTraditionalChinese(
String str) → String - 将简体字转换为繁体字 @param str 需要转换的简体字 @return 转换后的繁字体
-
isChinese(
String c) → bool - 判断某个字符是否为汉字 @return 是汉字返回true,否则返回false
-
isTraditionalChinese(
String c) → bool - 判断某个字符是否为繁体字 @param c 需要判断的字符 @return 是繁体字返回true,否则返回false
Constants
- chineseRegex → const String