summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/libfemto/std/strlen.c
blob: 74de6c4015279a87bd08467a813bc6211afd3522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// See LICENSE for license details.

#include <stddef.h>

size_t strlen(const char* s)
{
    const char *p = s;
    for (;; s++) {
        if (!*s) break;
    }
    return s - p;
}