source:
bootcd/isolinux/syslinux-6.03/com32/lib/strnlen.c
Last change on this file was e16e8f2, checked in by , 3 years ago | |
---|---|
|
|
File size: 159 bytes |
Line | |
---|---|
1 | /* |
2 | * strnlen() |
3 | */ |
4 | |
5 | #include <string.h> |
6 | |
7 | size_t strnlen(const char *s, size_t n) |
8 | { |
9 | const char *ss = s; |
10 | while (n-- && *ss) |
11 | ss++; |
12 | return ss - s; |
13 | } |
Note: See TracBrowser
for help on using the repository browser.