int FoldStringW(dwMapFlags, lpSrcStr, cchSrc, lpDestStr, cchDest) | |||
DWORD dwMapFlags; | |||
LPWSTR lpSrcStr; | |||
int cchSrc; | |||
LPWSTR lpDestStr; | |||
int cchDest; |
The FoldStringW function maps one wide character string to another performing the specified translation.
dwMapFlags
Indicates what type of transformation is to occur during mapping. Flags can be combined on a single transformation (only MAP_PRECOMPOSED and MAP_COMPOSITE are mutually exclusive). Mapping options include:#Name Meaning MAP_FOLDCZONE fold compatibility zone charactersMAP_PRECOMPOSED canonicalize accented characters to precomposedMAP_COMPOSITE canonicalize accented characters to composite MAP_FOLDDIGITS canonicalize all digits to Unicode ASC II “0”-“9”
lpSrcStr
Pointer to the supplied string to be mapped.
cchSrc
Character count of the input string buffer. If -1, lpSrcStr is assumed to be null-terminated and the length will be calculated automatically.
lpDestStr
Pointer to the memory buffer to store the resulting mapped string.
cchDest
The character count of the memory buffer pointed to by lpDestStr. If cchDest is 0, then the function returns the number of characters required to hold the mapped string. The lpDestStr pointer is not referenced in this case.
Success: number of characters written to lpDestStr
Failure: 0
This function sets GetLastError() with the following errors: ERROR_INSUFFICIENT_BUFFER, ERROR_INVALID_PARAMETER.
The mapped string will be null terminated if the source string is null-terminated.
The lpSrcStr and lpDestStr pointers may NOT be the same. In this case, the error ERROR_INVALID_PARAMETER results.