Dart Documentationunicode_helper.dart

unicode_helper.dart library

Properties

final Cc #

final Cc = 1

final Cf #

final Cf = 2

final Cn #

This library is a workaround for non ascii characters.

Some simple functions like isLetter(int charCode) checking a unicode table with a given unicode value.

Functions

bool isLetter(int c);
bool isUppercase(int c);
bool isLowercase(int c);
bool isDigit(int c);
bool isCurrency(int c);
bool isSeparator(int c);
bool isControl(int c);
final Cn = 0

final Co #

final Co = 3

final Cs #

final Cs = 4

final Ll #

final Ll = 5

final Lm #

final Lm = 6

final Lo #

final Lo = 7

final Lt #

final Lt = 8

final Lu #

final Lu = 9

final Mc #

final Mc = 10

final Me #

final Me = 11

final Mn #

final Mn = 12

final Nd #

final Nd = 13

final Nl #

final Nl = 14

final No #

final No = 15

final Pc #

final Pc = 16

final Pd #

final Pd = 17

final Pe #

final Pe = 18

final Pf #

final Pf = 19

final Pi #

final Pi = 20

final Po #

final Po = 21

final Ps #

final Ps = 22

final Sc #

final Sc = 23

final Sk #

final Sk = 24

final Sm #

final Sm = 25

final So #

final So = 26

final Zl #

final Zl = 27

final Zp #

final Zp = 28

final Zs #

final Zs = 29

Functions

bool isControl(int c) #

Indicates whether a specified Unicode character code is categorized as a control character.

bool isControl(int c) {
 var cat =  unicodeCharacterCategory[c];
 if((cat >= Cc) && (cat <= Cs)) {
   return true;
 }
 return false;
}

bool isSeparator(int c) #

Indicates whether a Unicode character code is categorized as a separator character. The Unicode standard classifies the characters \u000A (LF), \u000C (FF), and \u000A (CR) as control characters, not as separator characters.

bool isSeparator(int c) {
 var cat =  unicodeCharacterCategory[c];
 if((cat >= Zl) && (cat <= Zs)) {
   return true;
 }
 return false;
}

bool isCurrency(int c) #

Indicates whether the specified Unicode character code is categorized as a currency symbol.

bool isCurrency(int c) {
 var cat =  unicodeCharacterCategory[c];
 if (cat == Sc) {
   return true;
 }
 return false;
}

bool isDigit(int c) #

Indicates whether the specified Unicode character code is categorized as a decimal digit.

bool isDigit(int c) {
 var cat =  unicodeCharacterCategory[c];
 if (cat == Nd) {
   return true;
 }
 return false;
}

bool isLowercase(int c) #

Indicates whether the specified Unicode character code is categorized as an lower case character.

bool isLowercase(int c) {
 var cat =  unicodeCharacterCategory[c];
 if (cat == Ll) {
   return true;
 }
 return false;
}

bool isUppercase(int c) #

Indicates whether the specified Unicode character code is categorized as an upper case character.

bool isUppercase(int c) {
 var cat =  unicodeCharacterCategory[c];
 if (cat == Lu) {
   return true;
 }
 return false;
}

bool isLetter(int c) #

Indicates whether the specified Unicode character code is categorized as a Unicode letter.

bool isLetter(int c) {
 var cat =  unicodeCharacterCategory[c];
 if((cat >= Ll) && (cat <= Lu)) {
   return true;
 }
 return false;
}