Name:
Anonymous
2009-10-01 11:40
strnlen ("foobar", 0) = 0
strnlen ("foobar", 1) = 3
strnlen ("foobar", 2) = 2
strnlen ("foobar", 3) = 1
strnlen ("foobar", 4) = 0
strnlen ("foobar", 5) = 6
strnlen ("foobar", 6) = 6
strnlen ("foobar", 7) = 6
strnlen ("foobar", 8) = 6
strnlen ("foobar", 9) = 6
Name:
Anonymous
2009-10-02 5:25
I wrote a strnlen function once. It's purpose was to find out lengths for strings that may or may not have had a terminating zero.
Name:
Anonymous
2009-10-02 5:40
>>15
how would you know where to stop if it was not null terminated?