diff --git a/src/kernel/lib/string.c b/src/kernel/lib/string.c index f9501ae..7b9dcd4 100644 --- a/src/kernel/lib/string.c +++ b/src/kernel/lib/string.c @@ -1,2 +1,8 @@ // Generic String Library #define INDEX(s, c) (int)(c-s) + +unsigned int length(char* str) { + char* p; + for( p = str; *p != '\0'; p++ ) {} + return (unsigned int)(p-str); +}