mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Do some string library work
This commit is contained in:
parent
83d41e4588
commit
35203c0551
42 changed files with 1381 additions and 136 deletions
|
@ -21,12 +21,13 @@
|
|||
/**
|
||||
* Copies NUL-terminated UCS-2 or UTF-16 string.
|
||||
*
|
||||
* DEST and SRC must not overlap unless DEST ≤ SRC.
|
||||
* 𝑑 and 𝑠 must not overlap unless 𝑑 ≤ 𝑠.
|
||||
*
|
||||
* @param dest is destination memory
|
||||
* @param src is a NUL-terminated 16-bit string
|
||||
* @return original dest
|
||||
* @param d is dination memory
|
||||
* @param s is a NUL-terminated 16-bit string
|
||||
* @return original d
|
||||
* @asyncsignalsafe
|
||||
*/
|
||||
char16_t *strcpy16(char16_t *dest, const char16_t *src) {
|
||||
return memcpy(dest, src, (strlen16(src) + 1) * sizeof(char16_t));
|
||||
char16_t *strcpy16(char16_t *d, const char16_t *s) {
|
||||
return memcpy(d, s, (strlen16(s) + 1) * sizeof(char16_t));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue