Next: , Previous: , Up: Elementary string functions on NUL terminated strings   [Contents][Index]


4.5.3 Copying a NUL terminated Unicode string

The following functions copy portions of Unicode strings in memory.

Function: uint8_t * u8_strcpy (uint8_t *dest, const uint8_t *src)
Function: uint16_t * u16_strcpy (uint16_t *dest, const uint16_t *src)
Function: uint32_t * u32_strcpy (uint32_t *dest, const uint32_t *src)

Copies src to dest.

This function is similar to strcpy and wcscpy, except that it operates on Unicode strings.

Function: uint8_t * u8_stpcpy (uint8_t *dest, const uint8_t *src)
Function: uint16_t * u16_stpcpy (uint16_t *dest, const uint16_t *src)
Function: uint32_t * u32_stpcpy (uint32_t *dest, const uint32_t *src)

Copies src to dest, returning the address of the terminating NUL in dest.

This function is similar to stpcpy, except that it operates on Unicode strings.

Function: uint8_t * u8_strncpy (uint8_t *dest, const uint8_t *src, size_t n)
Function: uint16_t * u16_strncpy (uint16_t *dest, const uint16_t *src, size_t n)
Function: uint32_t * u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n)

Copies no more than n units of src to dest.

This function is similar to strncpy and wcsncpy, except that it operates on Unicode strings.

Function: uint8_t * u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n)
Function: uint16_t * u16_stpncpy (uint16_t *dest, const uint16_t *src, size_t n)
Function: uint32_t * u32_stpncpy (uint32_t *dest, const uint32_t *src, size_t n)

Copies no more than n units of src to dest. Returns a pointer past the last non-NUL unit written into dest. In other words, if the units written into dest include a NUL, the return value is the address of the first such NUL unit, otherwise it is dest + n.

This function is similar to stpncpy, except that it operates on Unicode strings.

Function: uint8_t * u8_strcat (uint8_t *dest, const uint8_t *src)
Function: uint16_t * u16_strcat (uint16_t *dest, const uint16_t *src)
Function: uint32_t * u32_strcat (uint32_t *dest, const uint32_t *src)

Appends src onto dest.

This function is similar to strcat and wcscat, except that it operates on Unicode strings.

Function: uint8_t * u8_strncat (uint8_t *dest, const uint8_t *src, size_t n)
Function: uint16_t * u16_strncat (uint16_t *dest, const uint16_t *src, size_t n)
Function: uint32_t * u32_strncat (uint32_t *dest, const uint32_t *src, size_t n)

Appends no more than n units of src onto dest.

This function is similar to strncat and wcsncat, except that it operates on Unicode strings.


Next: Comparing NUL terminated Unicode strings, Previous: Length of a NUL terminated Unicode string, Up: Elementary string functions on NUL terminated strings   [Contents][Index]