File: tickit_utf8_mbswidth.3

package info (click to toggle)
libtickit 0.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,556 kB
  • sloc: ansic: 13,904; perl: 228; makefile: 161; sh: 38
file content (25 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.TH TICKIT_UTF8_MBSWIDTH 3
.SH NAME
tickit_utf8_mbswidth, tickit_utf8_byte2col, tickit_utf8_col2byte \- count the column width of a Unicode string
.SH SYNOPSIS
.EX
.B #include <tickit.h>
.sp
.BI "int tickit_utf8_mbswidth(const char *" str );
.sp
.BI "int tickit_utf8_byte2col(const char *" str ", size_t " byte );
.BI "size_t tickit_utf8_col2byte(const char *" str ", "int " col );
.EE
.sp
Link with \fI\-ltickit\fP.
.SH DESCRIPTION
These functions are a set of shortcut wrappers around \fBtickit_utf8_count\fP(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 \fBtickit_utf8_count\fP() directly.
.PP
\fBtickit_utf8_mbswidth\fP() returns the number of columns wide the given Unicode string consumes.
.PP
\fBtickit_utf8_byte2col\fP() and \fBtickit_utf8_col2byte\fP() convert between byte and column indexes within a given string; returning one when given the other.
.SH "RETURN VALUE"
\fBtickit_utf8_mbswidth\fP() and \fBtickit_utf8_byte2col\fP() return an integer column count. \fBtickit_utf8_col2byte\fP() returns an integer byte count.
.SH "SEE ALSO"
.BR tickit_utf8_count (3),
.BR tickit (7)