unleashed-firmware/applications/external/totp/lib/polyfills/strnlen.c
2023-03-15 01:25:18 +03:00

11 lines
No EOL
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;
}