From 39c96dd3c0da3f787c2a7e1ddc1990498ad96279 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Wed, 23 Jan 2019 01:11:20 -0800 Subject: [PATCH] first function of stl --- stl/string.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 stl/string.h diff --git a/stl/string.h b/stl/string.h new file mode 100644 index 0000000..dbbeab9 --- /dev/null +++ b/stl/string.h @@ -0,0 +1,8 @@ +// our own stuff for stl utilities + +unsigned strlen(const char* str) { + unsigned idx = 0; + while(str[idx]) + idx++; + return idx; +}