module

UnicodeCharWidth

Provides methods to get fixed width of the unicode character or string.

Constants

NEW_LINE = "\n"
VERSION = "0.1.2"

Class methods

ambiguous?(codepoint : Int32)

returns whether is ambiguous width or not EastAsian Ambiguous characters that can be sometimes wide and sometimes narrow and require additional information not contained in the character code to further resolve their width.

Source
ambiguous?(char : Char)

returns whether char is ambiguous width or not EastAsian Ambiguous characters that can be sometimes wide and sometimes narrow and require additional information not contained in the character code to further resolve their width.

Source
default_condition

DefaultCondition is a condition in current locale

Source
east_asian?

return true if the current locale is CJK

Source
neutral?(codepoint : Int32)

returns whether is neutral width or not Neutral characters do not occur in legacy East Asian character sets.

Source
neutral?(char : Char)

returns whether char is neutral width or not Neutral characters do not occur in legacy East Asian character sets.

Source
pad_left(str : String, w : Int32)

returns a string filled in left by spaces in w cells

Source
pad_right(str : String, w : Int32)

returns a string filled in right by spaces in w cells

Source
truncate(str : String, w : Int32, tail : String)

return string truncated with w cells

Source
width(codepoint : Int32)

returns the number of cells in codepoint see http://www.unicode.org/reports/tr11/

Source
width(char : Char)

return the number of cells in `char'

Source
width(str : String)

returns string width

Source
wrap(str : String, w : Int32)

returns a string wrapped with w cells

Source

Nested types