3 runetochar, chartorune, runelen, runenlen, fullrune, utfecpy, utflen, utfnlen, utfrune, utfrrune, utfutf \- rune/UTF conversion
9 int runetochar(char *s, Rune *r)
12 int chartorune(Rune *r, char *s)
18 int runenlen(Rune *r, int n)
21 int fullrune(char *s, int n)
24 char* utfecpy(char *s1, char *es1, char *s2)
30 int utfnlen(char *s, long n)
33 char* utfrune(char *s, long c)
36 char* utfrrune(char *s, long c)
39 char* utfutf(char *s1, char *s2)
41 These routines convert to and from a
43 byte stream and runes.
52 and returns the number of bytes copied.
58 is the maximum number of bytes required to represent a rune.
67 and returns the number of bytes copied.
68 If the input is not exactly in
72 will convert to 0x80 and return 1.
75 returns the number of bytes
82 returns the number of bytes
83 required to convert the
91 returns 1 if the string
95 is long enough to be decoded by
98 This does not guarantee that the string
102 This routine is used by programs that
103 obtain input a byte at
104 a time and need to know when a full rune
107 The following routines are analogous to the
108 corresponding string routines with
118 copies UTF sequences until a null sequence has been copied, but writes no
121 If any sequences are copied,
123 is terminated by a null sequence, and a pointer to that sequence is returned.
124 Otherwise, the original
129 returns the number of runes that
130 are represented by the
136 returns the number of complete runes that
137 are represented by the first
143 If the last few bytes of the string contain an incompletely coded rune,
145 will not count them; in this way, it differs from
147 which includes every byte of the string.
151 returns a pointer to the first (last)
160 does not occur in the string.
161 The NUL byte terminating a string is considered to
162 be part of the string
166 returns a pointer to the first occurrence of
175 or 0 if there is none.
183 These routines were written by Rob Pike and Ken Thompson
184 and first appeared in Plan 9.