aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libc/musl/src/locale/strxfrm.c
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib/libc/musl/src/locale/strxfrm.c')
-rw-r--r--system/lib/libc/musl/src/locale/strxfrm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/locale/strxfrm.c b/system/lib/libc/musl/src/locale/strxfrm.c
new file mode 100644
index 00000000..32c46193
--- /dev/null
+++ b/system/lib/libc/musl/src/locale/strxfrm.c
@@ -0,0 +1,18 @@
+#include <string.h>
+#include <locale.h>
+#include "libc.h"
+
+/* collate only by code points */
+size_t __strxfrm_l(char *restrict dest, const char *restrict src, size_t n, locale_t loc)
+{
+ size_t l = strlen(src);
+ if (n > l) strcpy(dest, src);
+ return l;
+}
+
+size_t strxfrm(char *restrict dest, const char *restrict src, size_t n)
+{
+ return __strxfrm_l(dest, src, n, 0);
+}
+
+weak_alias(__strxfrm_l, strxfrm_l);