]> pd.if.org Git - pdclib/blobdiff - functions/string/strcat.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / string / strcat.c
index cb0c0a128d83d93cdbd8e3d43229236dc6904fa4..a0cef0e04267c24607c14e48394f7cadbcb036e7 100644 (file)
@@ -6,3 +6,31 @@
 // ----------------------------------------------------------------------------
 
 char * strcat( char * restrict s1, const char * restrict s2 ) { /* TODO */ };
+
+/* Therx code
+{
+    while (*s1)
+    {
+        s1++;
+    }
+    while (*s1++ = *s2++)
+    {
+        // EMPTY
+    }
+    return s1;
+}
+*/
+
+/* PDPC code - unreviewed
+{
+    char *p = s1;
+    
+    while (*p != '\0') p++;
+    while ((*p = *s2) != '\0')
+    {
+        p++;
+        s2++;
+    }
+    return (s1);
+}
+*/