module CharUtil
Extended Modules
Defined in:
util/char_util.crConstant Summary
-
CANONICAL =
{'\u00A0' => '\u3000', '\u2002' => '\u3000', '\u2003' => '\u3000', '\u2004' => '\u3000', '\u2007' => '\u3000', '\u2008' => '\u3000', '\u205F' => '\u3000', ' ' => '\u3000', '⟨' => '〈', '⟩' => '〉', '︱' => '|', '︳' => '|', '﹒' => '.', '﹐' => ',', '﹑' => '、', '、' => '、', '・' => '‧', '·' => '‧', '•' => '‧', '‵' => '`', '﹤' => '<', '﹥' => '>', '╴' => '_', '︰' => ':', '∶' => ':', '﹕' => ':', '﹔' => ';', '﹖' => '?', '﹗' => '!', '﹙' => '(', '﹚' => ')', '﹛' => '{', '﹜' => '}', '【' => '[', '﹝' => '[', '】' => ']', '﹞' => ']', '﹟' => '#', '﹠' => '&', '﹡' => '*', '﹢' => '+', '—' => '-', '﹣' => '-', 'ˉ' => '-', '¯' => '-', '「' => '“', '」' => '”', '『' => '‘', '』' => '’', '∧' => '︿', '∨' => '﹀', '﹦' => '=', '﹩' => '$', '﹪' => '%', '﹫' => '@', '¨' => '‥', '⦅' => '(', '⦆' => ')', '≒' => '≈', '≦' => '≤', '≧' => '≥'}
-
HANNUM_CHARS =
{'零', '〇', '一', '两', '二', '三', '四', '五', '六', '七', '八', '九', '十', '百', '千', '万', '亿', '兆'}
-
HANNUM_VALUE =
{'零' => 0, '两' => 2, '〇' => 0, '一' => 1, '二' => 2, '三' => 3, '四' => 4, '五' => 5, '六' => 6, '七' => 7, '八' => 8, '九' => 9, '十' => 10, '百' => 100, '千' => 1000, '万' => 10000, '亿' => 100000000, '兆' => 1000000000000_i64}
-
NORMALIZE =
{'〈' => '⟨', '〉' => '⟩', '《' => '⟨', '》' => '⟩', '\u3000' => ' ', 'ˉ' => '¯', '‥' => '¨', '‧' => '·', '•' => '·', '‵' => '`', '。' => '.', '﹒' => '.', '﹐' => ',', '﹑' => ',', '、' => ',', '︰' => ':', '∶' => ':', '﹔' => ';', '﹕' => ':', '﹖' => '?', '﹗' => '!', '﹙' => '(', '﹚' => ')', '﹛' => '{', '﹜' => '}', '【' => '[', '﹝' => '[', '】' => ']', '﹞' => ']', '﹟' => '#', '﹠' => '&', '﹡' => '*', '﹢' => '+', '﹣' => '-', '﹤' => '<', '﹥' => '>', '﹦' => '=', '﹩' => '$', '﹪' => '%', '﹫' => '@', '≒' => '≈', '≦' => '≤', '≧' => '≥', '︱' => '|', '︳' => '|', '︿' => '∧', '﹀' => '∨', '╴' => '_', '「' => '“', '」' => '”', '『' => '‘', '』' => '’', '⦅' => '(', '⦆' => ')'}
Instance Method Summary
- #digit_to_int(char : Char)
- #downcase_normalize(char : Char) : Char
- #fullwidth?(char : Char)
- #fw_alnum?(char : Char)
- #fw_alpha?(char : Char)
- #fw_digit?(char : Char)
- #halfwidth?(char : Char)
- #hannum?(char : Char)
- #hanzi_to_int(char : Char)
- #hw_alnum?(char : Char)
- #hw_alpha?(char : Char)
- #hw_digit?(char : Char)
- #normalize(str : String) : String
- #normalize(char : Char) : Char
-
#to_canon(char : Char, upcase : Bool = false) : Char
convert input to fullwidth form
-
#to_canon(str : String, upcase : Bool = false) : String
convert input to fullwidth form
- #to_fullwidth(char : Char)
- #to_halfwidth(char : Char)
- #to_halfwidth(str : String)