summaryrefslogtreecommitdiff
path: root/src/locale/strxfrm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/locale/strxfrm.c')
-rw-r--r--src/locale/strxfrm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/locale/strxfrm.c b/src/locale/strxfrm.c
new file mode 100644
index 00000000..8f123399
--- /dev/null
+++ b/src/locale/strxfrm.c
@@ -0,0 +1,9 @@
+#include <string.h>
+
+/* collate only by code points */
+size_t strxfrm(char *dest, const char *src, size_t n)
+{
+ size_t l = strlen(src);
+ if (n > l) strcpy(dest, src);
+ return l;
+}