aboutsummaryrefslogtreecommitdiff
path: root/src/base/string/raw/ncopy.c
blob: cf18a4b8e72a4fcb816133065689d2fc380ded61 (plain)
1
2
3
4
5
6
7
8
9
char *
strยทncopy(char *dst, int n, char *src)
{
    while(*src && n-- > 0)
        *dst++ = *src++;

    *dst = 0;
    return dst;
}