wstring(3W) wstring(3W)
wstring: wssize, wstok, strtows - wchar_t string operations and type
transformation
#include <widec.h>
int wssize(wchar_t *s<b>);
wchar_t *wstok(wchar_t *s1<b>, wchar_t *s2<b>);
wchar_t *strtows(wchar_t *s1<b>, char *s2<b>);
DESCRIPTION (International Functions) [Toc] [Back] The arguments s1, s2, and s point to wchar_t strings (that is, arrays of
wchar_t characters terminated by a wchar_t null character).
wssize returns the number of wchar_t characters in s, not including the
terminating wchar_t null character.
wstok treats the wchar_t string s1 as a sequence of zero or more text
tokens, separated by spans of one or more wchar_t characters from the
separator wchar_t string s2. The first call (with the pointer s1
specified) returns a pointer to the first wchar_t character of the first
token, and writes a wchar_t null character into s1 immediately following
the returned token. The function keeps track of its position in the
wchar_t string between separate calls, so that subsequent calls (which
must be made with the first argument a null pointer) will progress
through the wchar_t string s1 immediately following that token.
Similarly, subsequent calls will progress through the wchar_t string s1
until no tokens remain. The wchar_t separator string s2 may be different
from call to call. A null pointer is returned when no token remains in
s1.
strtows transforms EUC in character string s2 into wchar_t characters,
and transfers those to wchar_t string s1, stopping after the null
character has been processed.
malloc(3C), widec(3S), wcstring(3S), malloc(3X).
On success, strtows returns s1. If an illegal byte sequence is detected,
a null pointer is returned and errno is set to EILSEQ.
PPPPaaaaggggeeee 1111 [ Back ]
|