class UnicodeCharWidth::Condition
- UnicodeCharWidth::Condition
- Reference
- Object
Defined in:
charwidth/charwidth.crConstructors
Instance Method Summary
-
#ambiguous?(codepoint : Int32)
returns whether is ambiguous width or not
-
#east_asian : Bool
Will be set to true if the current locale is CJK
-
#east_asian=(east_asian : Bool)
Will be set to true if the current locale is CJK
-
#neutral?(codepoint : Int32)
returns whether is neutral width or not
-
#pad_left(str : String, w : Int32)
returns a string filled in left by spaces in
w
cells -
#pad_right(str : String, w : Int32)
returns a string filled in right by spaces in
w
cells -
#strict_emoji_neutral : Bool
should be set to false if handle broken fonts
-
#strict_emoji_neutral=(strict_emoji_neutral : Bool)
should be set to false if handle broken fonts
-
#truncate(str : String, w : Int32, tail : String)
return string truncated with
w
cells -
#width(codepoint : Int32)
returns the number of cells in codepoint see http://www.unicode.org/reports/tr11/
-
#width(char : Char)
return the number of cells in `char'
-
#width(str : String)
returns string width
-
#wrap(str : String, w : Int32)
returns a string wrapped with
w
cells
Constructor Detail
Instance Method Detail
def strict_emoji_neutral=(strict_emoji_neutral : Bool)
#
should be set to false if handle broken fonts
def width(codepoint : Int32)
#
returns the number of cells in codepoint see http://www.unicode.org/reports/tr11/