Skip to content

Commit ab61ed7

Browse files
committed
Too incompetent to do an ASM version. Here, have some C instead.
1 parent 7ac4535 commit ab61ed7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/string/string.c

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
size_t strlen(const char *s)
2+
{
3+
const char *p;
4+
5+
while (1)
6+
{
7+
if(!*(ptr++)) break;
8+
if(!*(ptr++)) break;
9+
if(!*(ptr++)) break;
10+
if(!*(ptr++)) break;
11+
if(!*(ptr++)) break;
12+
if(!*(ptr++)) break;
13+
if(!*(ptr++)) break;
14+
}
15+
16+
return (ptr - 1) - s;
17+
}

0 commit comments

Comments
 (0)