Module CharInfo_width.String

Parameters

Signature

val width : ?cfg:Cfg.widthTable option -> US.t -> (int, int) Result.result

width str returns the column width of str and the value returned is of type (int, int) result. When Ok width returnted, width is the width of str. When Error pos returned, pos is the offset of the left most unprintable character in str.