mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
lib: add u16_strcpy/strdup functions
Add u16_strcpy() and u16_strdup(). The latter function will be used later in implementing efi HII database protocol. Signed-off-by: Akashi Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
committed by
Alexander Graf
parent
2859f446b0
commit
2a3537ae22
@@ -191,6 +191,29 @@ size_t u16_strlen(const u16 *in);
|
||||
*/
|
||||
size_t u16_strnlen(const u16 *in, size_t count);
|
||||
|
||||
/**
|
||||
* u16_strcpy() - copy u16 string
|
||||
*
|
||||
* Copy u16 string pointed to by src, including terminating null word, to
|
||||
* the buffer pointed to by dest.
|
||||
*
|
||||
* @dest: destination buffer
|
||||
* @src: source buffer (null terminated)
|
||||
* Return: 'dest' address
|
||||
*/
|
||||
u16 *u16_strcpy(u16 *dest, const u16 *src);
|
||||
|
||||
/**
|
||||
* u16_strdup() - duplicate u16 string
|
||||
*
|
||||
* Copy u16 string pointed to by src, including terminating null word, to a
|
||||
* newly allocated buffer.
|
||||
*
|
||||
* @src: source buffer (null terminated)
|
||||
* Return: allocated new buffer on success, NULL on failure
|
||||
*/
|
||||
u16 *u16_strdup(const u16 *src);
|
||||
|
||||
/**
|
||||
* utf16_to_utf8() - Convert an utf16 string to utf8
|
||||
*
|
||||
|
Reference in New Issue
Block a user