diff options
Diffstat (limited to '05/string.h')
-rw-r--r-- | 05/string.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/05/string.h b/05/string.h new file mode 100644 index 0000000..44a25e6 --- /dev/null +++ b/05/string.h @@ -0,0 +1,14 @@ +#ifndef _STRING_H +#define _STRING_H + +#include <stdc_common.h> + +void *memset(void *s, int c, size_t n) { + char *p = s, *end = p + n; + while (p < end) + *p++ = c; + return s; +} + + +#endif // _STRING_H |