projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add fast path for normal mutexes back to pthread_mutex_lock
[oweals/musl.git]
/
src
/
locale
/
wcsxfrm.c
1
#include <wchar.h>
2
3
/* collate only by code points */
4
size_t wcsxfrm(wchar_t *dest, const wchar_t *src, size_t n)
5
{
6
size_t l = wcslen(src);
7
if (l >= n) {
8
wmemcpy(dest, src, n-1);
9
dest[n-1] = 0;
10
} else wcscpy(dest, src);
11
return l;
12
}