Multi-Byte Character And String Conversions - HP 9000 User Manual

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

Table 6-10. Multi-byte Character and String Conversions
Routine
Function
mblen
If s is not a null pointer, the function examines the next n bytes. If
the next n or fewer bytes form a valid multi-byte character, the
number of bytes in the multi-byte character is returned. If they do
not form a valid multi-byte character,
-1
is returned. If s points to
the null character,
0
is returned.
mbtowc
Converts a multi-byte character pointed to by s to its wide character
representation, storing the result in the array pointed to by pwc. The
number of bytes in the original multi-byte character is returned; at
most n bytes are examined.
wctomb
Converts a wide character pointed to by wchar to its multi-byte
representation, storing the result in the array pointed to by s. The
number of bytes in the converted character is returned.
mbstowcs
Converts a sequence of multi-byte characters in the array pointed to
by s into a sequence of corresponding wide character codes, storing
the result in the array pointed to by pwcs, and stopping after n codes
are examined, or a null character is encountered.
6
wcstombs
Converts a sequence of wide character codes in the array pointed to
by pwcs into a sequence of multi-byte characters codes and stores
them in the array pointed to by s, stopping after n bytes are
examined, or a null character is encountered.
Developing International Software
6-19

Advertisement

Table of Contents
loading

Table of Contents