/* string.h 2000-10 writen by tenk* */ #ifndef _STRING_H_ #define _STRING_H_ #ifdef __cplusplus extern "C" { #endif void *memset(void *dst, int c, size_t n); void *memcpy(void *dst, const void *src, size_t n); void *memmove(void *dst, const void *src, size_t n); int memcmp(const void *left, const void *right, size_t n); void *memchr(const void *src, int c, size_t n); size_t strlen(const char *src); char *strcpy(char *dst, const char *s); char *strncpy(char *dst, const char *s, size_t n); char *strcat(char *dst, const char *s); char *strncat(char *dst, const char *s, size_t n); char *strchr(const char *src, int c); char *strrchr(const char *src, int c); int strcmp(const char *left, const char *right); int strncmp(const char *left, const char *right, size_t n); char *strupr(char *src); char *strlwr(char *src); size_t strspn(const char *src, const char *tbl); size_t strcspn(const char *src, const char *tbl); char *strpbrk(const char *src, const char *tbl); char *strstr(const char *src, const char *ptn); char *strdup(const char *s); /* 未実装 // char *strerror(int errno); // int strcoll(const char *a, const char *b); // size_t strxfrm(char *d, const char *s, size_t n); */ #ifndef __STDC__ /* ANSI-C 以外の関数 */ int memicmp(const void *left, const void *right, size_t n); void* memccpy(void *dst, const void *src, int termChr, size_t sz); void _swab(const char *src, char *dst, size_t sz); char *stpcpy(char *d, const char *s); char *strset(char *d, int c); char *strnset(char *d, int c, size_t n); char *strrev(char *s); int stricmp(const char *left, const char *right); int strnicmp(const char *left, const char *right, size_t n); #define strcmpi(l,r) stricmp(l,r) #define strncmpi(l,r,n) strnicmp(l,r,n) void *memclr(void *dst, size_t n); void *memrcpy(void *dst, const void *src, size_t n); char *strend(const char *src); #define index(s,c) strchr(s,c) #define rindex(s,c) strrchr(s,c) /* 未実装 // int stricoll(const char *a, const char *b); // int strncoll(const char *a, const char *b, size_t n); // int strnicoll(const char *a, const char *b, int len); */ #endif #ifdef __cplusplus }; #endif #endif /* _STRING_H_ */