exbox v1.0.0 ExBox.Width

String and character widths utilities.

Summary

Functions

Check if the character represented by a given Unicode code point is fullwidth

Get the visual width of a string

Get the visual width of the widest line in a string

Functions

is_fullwidth_char(c)
is_fullwidth_char(char) :: boolean

Check if the character represented by a given Unicode code point is fullwidth

https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms

string(string)
string(String.t) :: non_neg_integer

Get the visual width of a string

Visual width means the number of columns required to display a string

widest_line(string)
widest_line(String.t) :: non_neg_integer

Get the visual width of the widest line in a string

Visual width means the number of columns required to display a string