summaryrefslogtreecommitdiff
path: root/zap/source/amd64/mem/strcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'zap/source/amd64/mem/strcat.c')
-rw-r--r--zap/source/amd64/mem/strcat.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/zap/source/amd64/mem/strcat.c b/zap/source/amd64/mem/strcat.c
new file mode 100644
index 0000000..f7f66c8
--- /dev/null
+++ b/zap/source/amd64/mem/strcat.c
@@ -0,0 +1,19 @@
+/*
+ Copyright 2022 Gabriel Jensen.
+ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+ If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
+*/
+
+#include <zap/priv.h>
+
+#include <zap/mem.h>
+
+#include <stddef.h>
+
+void zap_strcat(char const * const _lstr,char const * const _rstr,char * const _buf) {
+ zap_sz const llen = zap_strlen (_lstr);
+ zap_sz const rlen = zap_strlen (_rstr);
+ zap_memcp(_lstr,llen,_buf);
+ zap_memcp(_rstr,rlen,_buf + llen);
+ _buf[llen + rlen] = '\x0';
+}