4 char *strncpy(char *d
, char *s
, long n
)
10 memset(d
+ len
, 0, n
- len
);
14 char *strcat(char *d
, char *s
)
16 strcpy(d
+ strlen(d
), s
);
20 char *strstr(char *s
, char *r
)
26 if (!memcmp(s
, r
, len
))
28 s
= strchr(s
+ 1, *r
);
33 char *strdup(const char *s
)
35 size_t n
= strlen(s
) + 1;
36 char *res
= malloc(n
);