logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

tickit_utf8_mbswidth, tickit_utf8_byte2col, tickit_utf8_col2byte - count the column width of a Unicode

Description

       These functions are a set of shortcut wrappers around tickit_utf8_count(3) for performing a single simple
       counting operation on a given string. When performing multiple operations on a given string, it  is  more
       efficient to use tickit_utf8_count() directly.

       tickit_utf8_mbswidth() returns the number of columns wide the given Unicode string consumes.

       tickit_utf8_byte2col()  and tickit_utf8_col2byte() convert between byte and column indexes within a given
       string; returning one when given the other.

Name

       tickit_utf8_mbswidth,  tickit_utf8_byte2col,  tickit_utf8_col2byte  - count the column width of a Unicode
       string

Return Value

tickit_utf8_mbswidth() and tickit_utf8_byte2col() return an integer column count.  tickit_utf8_col2byte()
       returns an integer byte count.

See Also

tickit_utf8_count(3), tickit(7)

                                                                                         TICKIT_UTF8_MBSWIDTH(3)

Synopsis

#include<tickit.h>inttickit_utf8_mbswidth(constchar*str);inttickit_utf8_byte2col(constchar*str,size_tbyte);size_ttickit_utf8_col2byte(constchar*str,intcol);

       Link with -ltickit.

See Also