|
wchar_t
#include <stddef.h>
|
stand-alone
|
The type of a wide character. See stddef.h
|
|
wcstombs
#include <stddef.h>
size_t wcstombs (
char *s,
const wchar_t *pwcs,
size_t n
);
|
stand-alone
|
The sequence of wide characters pointed to by pwcs is converted to a multibyte string and stored in the array pointed to by s. Conversion stops when a NUL character has been converted, or when the next character stored would exceed the limit of n words. If the two strings overlap, the effect is undefined.
wcstombs returns the number of octets (eight-bit bytes) stored, excluding the NUL character, if any. Note that, in the present version of Diamond, multibyte characters and wide characters are both one octet in length and there is no state-dependent encoding, so this function is equivalent to a string copy. All possible element values are valid, so no error return can happen.
|
|
wctomb
#include <stdlib.h>
int wctomb (
char *s,
wchar_t wchar
);
|
stand-alone
|
If s is a null pointer, mbtowc returns 0, indicating that, for the current version of Diamond, multibyte character encodings are never state dependent. Otherwise, it returns the width in octets (eight-bit bytes) of the multibyte character corresponding to value of wchar. In the current version, this is always 1.
In addition, the multibyte character corresponding to the value of wchar is stored at the location pointed to by s. In the current version, as both wide and multibyte characters are always 1 octet in length, this is equivalent to storing wchar at *s.
|
|
|