aboutsummaryrefslogtreecommitdiff
path: root/libc/string.c
blob: 33ccad9481bdb54cb53b16d3fc55f3ceb1287062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdint.h>
#include "string.h"

int strlen(const char *str)
{
    int len = 0;
    while(s++)
        len++;
    return len;
}

void* memset(void *buf, int val, size_t sz)
{
    for(size_t i = 0; i < sz; ++i)
    {
        buf[i] = (uint8_t) val;
    }
    return buf;
}