Transforms a specified number of wide characters from one string to another string.
#include <wchar.h>
size_t wcsxfrm (
wchar_t *dst,
const wchar_t *src,
size_t n);
(OUT) Points to the array into which to place the transformed wide characters.
(IN) Points to the wide-character string to be transformed.
(IN) Specifies the number of wide characters to transform.
If successful, returns the length of the transformed string and does not change the value of errno. If the length is equal to n or more than n, the contents of the array pointed to by dst are indeterminate.
Although no value is reserved to indicate an error, errno is set to EINVAL if the src string contains invalid wide character codes. An application that needs to check for this error situation must set errno to 0 before making a call to this function.
The wcsxfrm function transforms, for no more than n characters, the string pointed to by src to the buffer pointed to by dst. The transformation uses the collating sequence selected by setlocale so that two transformed strings compare identically (using wcsncmp) to a comparison of the original two strings using wcscoll.
To determine how much room is needed to store the results of the function, set dst to NULL and n to 0 and call the function with src specifying the string to convert.