SYNOPSIS
#include <wchar.h>
size_t wcsrtombs(char *dst, const wchar_t **src, size_t len, mbstate_t *ps);
size_t wcsnrtombs(char *dst, const wchar_t **src, size_t nwc, size_t len, mbstate_t *ps);
#include <locale.h>
size_t wcsrtombs_l(char *dst, const wchar_t **src, size_t len, mbstate_t *ps, locale_t locale);
size_t wcsnrtombs_l(char *dst, const wchar_t **src, size_t nwc, size_t len, mbstate_t *ps, locale_t locale);
DESCRIPTION
The
- When a code is encountered that does not correspond to a valid character.
- When the next character would exceed the limit of len total bytes stored into the array pointed to by dst (and dst is not a null pointer).
Each conversion takes place as
if by a call to the
If dst is not a null pointer, the pointer object pointed to by src is assigned either a null pointer (if conversion stopped due to reaching a terminating null wide character) or the address just past the last wide character converted (if any). If conversion stopped due to reaching a terminating null wide character, the resulting state described is the initial conversion state.
If the specified state pointer is null, the
The behavior of this function is affected by the LC_CTYPE category of the current locale.
The
PARAMETERS
- dst
-
Is the destination buffer used to receive converted characters. This can be a null pointer if no conversion is desired.
- src
-
Points to the string to be converted. If dst is not null, the referenced pointer is updated as described in the DESCRIPTION section.
- nwc
-
Stop after processing nwc characters from the src characters.
- len
-
Is the maximum number of bytes characters to write to dst, if dst is not null.
- ps
-
Is the conversion state. If this is null, an internal mbstate_t object is used.
- locale
-
Is a locale_t perhaps returned by
newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set withuselocale() .
RETURN VALUES
If the input conversion encounters a code that does not correspond
to a valid character, an encoding error occurs. In this case,
the
CONFORMANCE
MULTITHREAD SAFETY LEVEL
MT-Safe, with exceptions.
The function
The function
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
mbrlen() ,mbrlen_l() ,mbrtowc() ,mbrtowc_l() ,mbsinit() ,mbsinit_l() ,mbsrtowcs() ,mbsrtowcs_l() ,newlocale() ,setlocale() ,wcrtomb() ,wcrtomb_l()
PTC MKS Toolkit 10.5 Documentation Build 40.