summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/libfemto/std/strcmp.c
blob: 73d9d8a26473e53fe85b6579a1d0dd79b1d4747b (plain)
1
2
3
4
5
6
7
8
9
// See LICENSE for license details.

#include <stddef.h>

int strcmp(const char *s1, const char *s2)
{
    while (*s1 && *s2 && *s1 == *s2) { s1++; s2++; }
    return *s1 - *s2;
}