2021-04-27 18:33:31 +02:00
|
|
|
#ifndef _STRING_H_
|
|
|
|
#define _STRING_H_
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2022-05-09 20:19:05 +02:00
|
|
|
extern void* _FUNC(memccpy)(void* restrict dest, const void* restrict src, int c, size_t n);
|
2021-04-27 18:33:31 +02:00
|
|
|
|
2021-05-10 00:12:43 +02:00
|
|
|
#ifdef __TINYC__
|
|
|
|
extern void* memcpy(void* s1, const void* s2, size_t n);
|
|
|
|
extern void* memset(void* s, int c, size_t n);
|
2021-04-27 18:33:31 +02:00
|
|
|
extern void* memmove(void* s1, const void* s2, size_t n);
|
2021-05-10 00:12:43 +02:00
|
|
|
#else
|
2022-05-09 20:19:05 +02:00
|
|
|
extern void* _FUNC(memcpy)(void* s1, const void* s2, size_t n);
|
|
|
|
extern void* _FUNC(memset)(void* s, int c, size_t n);
|
|
|
|
extern void* _FUNC(memmove)(void* s1, const void* s2, size_t n);
|
2021-05-10 00:12:43 +02:00
|
|
|
#endif
|
2021-04-27 18:33:31 +02:00
|
|
|
|
2022-05-09 20:19:05 +02:00
|
|
|
extern char* _FUNC(strcpy)(char* s1, const char* s2);
|
|
|
|
extern char* _FUNC(strncpy)(char* s1, const char* s2, size_t n);
|
|
|
|
extern char* _FUNC(strcat)(char* s1, const char* s2);
|
|
|
|
extern char* _FUNC(strncat)(char* s1, const char* s2, size_t n);
|
|
|
|
extern int _FUNC(memcmp)(const void* s1, const void* s2, size_t n);
|
|
|
|
extern int _FUNC(strcmp)(const char* s1, const char* s2);
|
|
|
|
extern int _FUNC(strcoll)(const char* s1, const char* s2);
|
|
|
|
extern int _FUNC(strncmp)(const char* s1, const char* s2, size_t n);
|
|
|
|
extern size_t _FUNC(strxfrm)(char* s1, const char* s2, size_t n);
|
|
|
|
extern void* _FUNC(memchr)(const void* s, int c, size_t n);
|
|
|
|
extern char* _FUNC(strchr)(const char* s, int c);
|
|
|
|
extern size_t _FUNC(strcspn)(const char* s1, const char* s2);
|
|
|
|
extern char* _FUNC(strpbrk)(const char* s1, const char* s2);
|
|
|
|
extern char* _FUNC(strrchr)(const char* s, int c);
|
|
|
|
extern size_t _FUNC(strspn)(const char* s1, const char* s2);
|
|
|
|
extern char* _FUNC(strstr)(const char* s1, const char* s2);
|
|
|
|
extern char* _FUNC(strtok)(char* s1, const char* s2);
|
|
|
|
extern char* _FUNC(strerror)(int errnum);
|
|
|
|
extern size_t _FUNC(strlen)(const char* s);
|
|
|
|
extern char* _FUNC(strrev)(char* str);
|
|
|
|
extern char* _FUNC(strdup)(const char* str);
|
2021-04-27 18:33:31 +02:00
|
|
|
|
|
|
|
#endif
|