Locale-Sensitive Length Functions
void *mempcpy(void *restrict to, const void *restrict from, size_t size);
wchar_t *wmempcpy(wchar_t *restrict wto, const wchar_t *restrict wfrom, size_t size);
Internationalization (I18n) Function Overview
The mempcpy function is nearly identical to the memcpy function. It copies size bytes from the object beginning at from into the object pointed to by to . But instead of returning the value of to it returns a pointer to the byte following the last written byte in the object beginning at to . I.e., the value is ((void *) ((char *) to + size)) .
The wmempcpy function is nearly identical to the wmemcpy function. It copies size wide characters from the object beginning at wfrom into the object pointed to by wto . But instead of returning the value of wto it returns a pointer to the wide character following the last written wide character in the object beginning at wto . I.e., the value is wto + size .
This function is useful in situations where a number of objects shall be copied to consecutive memory positions.
I18n Issues
Special care must be taken with the size parameter. See Locale-Sensitive Length Functions for a complete discussion of the issues involved with functions that pass length parameters.
Recommended Replacements*
*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.
Locale-Sensitive Length Functions
|