mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-29 22:23:06 +00:00
11 lines
178 B
C
11 lines
178 B
C
|
#include "strnlen.h"
|
||
|
|
||
|
size_t strnlen(const char* s, size_t maxlen) {
|
||
|
size_t len;
|
||
|
|
||
|
for(len = 0; len < maxlen; len++, s++) {
|
||
|
if(!*s) break;
|
||
|
}
|
||
|
|
||
|
return len;
|
||
|
}
|