aboutsummaryrefslogtreecommitdiff
path: root/pk/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'pk/string.c')
-rw-r--r--pk/string.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/pk/string.c b/pk/string.c
index b1b9abc..e896379 100644
--- a/pk/string.c
+++ b/pk/string.c
@@ -45,6 +45,18 @@ size_t strlen(const char *s)
return p - s;
}
+int strcmp(const char* s1, const char* s2)
+{
+ unsigned char c1, c2;
+
+ do {
+ c1 = *s1++;
+ c2 = *s2++;
+ } while (c1 != 0 && c1 == c2);
+
+ return c1 - c2;
+}
+
char* strcpy(char* dest, const char* src)
{
char* d = dest;