aboutsummaryrefslogtreecommitdiff
path: root/src/base/string/raw/ncopy.c
blob: df0e9daab978b7347add607dcbfcfac87d6d0a34 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <u.h>

char *
strยทncopy(char *dst, intptr n, char *src)
{
    while(*src && n-- > 0)
        *dst++ = *src++;

    *dst = 0;
    return dst;
}