]> pd.if.org Git - pdclib/blobdiff - functions/string/strpbrk.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / string / strpbrk.c
index 78e2d65ae8081011b3b73ac6f715542ed44a8a58..810e40ca40b9f5b51b4e708f3699773b777c90de 100644 (file)
@@ -15,3 +15,23 @@ char * strpbrk( char * s1, const char * s2 ) { /* TODO */ };
 // Standard C
 
 char * strpbrk( const char *s1, const char * s2 ) { /* TODO */ };
+
+/* PDPC code - unreviewed
+{
+    const char *p1;
+    const char *p2;
+    
+    p1 = s1;
+    while (*p1 != '\0')
+    {
+        p2 = s2;
+        while (*p2 != '\0')
+        {
+            if (*p1 == *p2) return ((char *)p1);
+            p2++;
+        }
+        p1++;
+    }
+    return (NULL);
+}
+*/