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
74 will convert to 0x80 and return 1.
77 returns the number of bytes
84 returns the number of bytes
85 required to convert the
93 returns 1 if the string
97 is long enough to be decoded by
100 This does not guarantee that the string
104 This routine is used by programs that
105 obtain input a byte at
106 a time and need to know when a full rune
109 The following routines are analogous to the
110 corresponding string routines with
120 copies UTF sequences until a null sequence has been copied, but writes no
123 If any sequences are copied,
125 is terminated by a null sequence, and a pointer to that sequence is returned.
126 Otherwise, the original
131 returns the number of runes that
132 are represented by the
138 returns the number of complete runes that
139 are represented by the first
145 If the last few bytes of the string contain an incompletely coded rune,
147 will not count them; in this way, it differs from
149 which includes every byte of the string.
153 returns a pointer to the first (last)
162 does not occur in the string.
163 The NUL byte terminating a string is considered to
164 be part of the string
168 returns a pointer to the first occurrence of
177 or 0 if there is none.
185 .B \*9/src/lib9/utf/rune.c
187 .B \*9/src/lib9/utf/utfrune.c