3 runetochar, chartorune, runelen, runenlen, fullrune, utfecpy, utflen, utfnlen, utfrune, utfrrune, utfutf \- rune/UTF conversion
11 int runetochar(char *s, Rune *r)
14 int chartorune(Rune *r, char *s)
20 int runenlen(Rune *r, int n)
23 int fullrune(char *s, int n)
26 char* utfecpy(char *s1, char *es1, char *s2)
32 int utfnlen(char *s, long n)
35 char* utfrune(char *s, long c)
38 char* utfrrune(char *s, long c)
41 char* utfutf(char *s1, char *s2)
43 These routines convert to and from a
45 byte stream and runes.
54 and returns the number of bytes copied.
60 is the maximum number of bytes required to represent a rune.
69 and returns the number of bytes copied.
70 If the input is not exactly in
80 returns the number of bytes
87 returns the number of bytes
88 required to convert the
96 returns 1 if the string
100 is long enough to be decoded by
103 This does not guarantee that the string
107 This routine is used by programs that
108 obtain input a byte at
109 a time and need to know when a full rune
112 The following routines are analogous to the
113 corresponding string routines with
123 copies UTF sequences until a null sequence has been copied, but writes no
126 If any sequences are copied,
128 is terminated by a null sequence, and a pointer to that sequence is returned.
129 Otherwise, the original
134 returns the number of runes that
135 are represented by the
141 returns the number of complete runes that
142 are represented by the first
148 If the last few bytes of the string contain an incompletely coded rune,
150 will not count them; in this way, it differs from
152 which includes every byte of the string.
156 returns a pointer to the first (last)
165 does not occur in the string.
166 The NUL byte terminating a string is considered to
167 be part of the string
171 returns a pointer to the first occurrence of
180 or 0 if there is none.
188 .B \*9/src/lib9/utf/rune.c
190 .B \*9/src/lib9/utf/utfrune.c