summaryrefslogtreecommitdiff
path: root/src/string/strxfrm.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-08 18:42:39 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-08 18:42:39 -0500
commit7ef8a7379f7f7d09e71ccae2a0b688c3cd80423f (patch)
tree092ab0aed1769117fd7b28b8592f6f96b0e0d5af /src/string/strxfrm.c
parent6acf19370e8adff79cd83b257d3f04aeaf2a59dd (diff)
merge sources into single tree
Diffstat (limited to 'src/string/strxfrm.c')
-rw-r--r--src/string/strxfrm.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/string/strxfrm.c b/src/string/strxfrm.c
new file mode 100644
index 00000000..b6ec62b6
--- /dev/null
+++ b/src/string/strxfrm.c
@@ -0,0 +1,32 @@
+#include <string.h>
+#include "nonstd/assert.h"
+
+/** transform string **/
+size_t strxfrm(char * restrict s1, const char * restrict s2, size_t n)
+{
+ /* TODO */
+ (void)s1; (void)s2; (void)n;
+ ASSERT_NONNULL(s2);
+
+ if (n != 0) {
+ ASSERT_NONNULL(s1);
+ ASSERT_NOOVERLAP(s1, s2, n);
+ }
+
+ return 0;
+}
+
+/***
+transforms up to ARGUMENT(n) bytes of the string at ARGUMENT(s2),
+placing the transformed string at ARGUMENT(s1). The transformed string is the
+canonical form of the string used for collation purposes. If a CHAR(\0) is
+transformed, no further characters are transformed.
+***/
+
+/*
+UNDEFINED(ARGUMENT(n) is not ZERO and ARGUMENT(s1) is CONSTANT(NULL))
+*/
+/*
+ RETURN_ALWAYS(the length of the transformed string, not including the terminating CHAR(\0));
+STDC(1)
+*/