1
0

string.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef _STRING_H
  2. #define _STRING_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #undef NULL
  7. #ifdef __cplusplus
  8. #define NULL 0
  9. #else
  10. #define NULL ((void*)0)
  11. #endif
  12. #define __NEED_size_t
  13. #include <bits/alltypes.h>
  14. void *memcpy (void *, const void *, size_t);
  15. void *memmove (void *, const void *, size_t);
  16. void *memccpy (void *, const void *, int, size_t);
  17. void *memset (void *, int, size_t);
  18. int memcmp (const void *, const void *, size_t);
  19. void *memchr (const void *, int, size_t);
  20. char *strcpy (char *, const char *);
  21. char *strncpy (char *, const char *, size_t);
  22. char *strcat (char *, const char *);
  23. char *strncat (char *, const char *, size_t);
  24. int strcmp (const char *, const char *);
  25. int strncmp (const char *, const char *, size_t);
  26. int strcoll (const char *, const char *);
  27. size_t strxfrm (char *, const char *, size_t);
  28. char *strchr (const char *, int);
  29. char *strrchr (const char *, int);
  30. size_t strcspn (const char *, const char *);
  31. size_t strspn (const char *, const char *);
  32. char *strpbrk (const char *, const char *);
  33. char *strstr (const char *, const char *);
  34. char *strtok (char *, const char *);
  35. size_t strlen (const char *);
  36. char *strerror (int);
  37. #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  38. || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
  39. char *strtok_r (char *, const char *, char **);
  40. int strerror_r (int, char *, size_t);
  41. char *stpcpy(char *, const char *);
  42. char *stpncpy(char *, const char *, size_t);
  43. size_t strnlen (const char *, size_t);
  44. char *strdup (const char *);
  45. char *strndup (const char *, size_t);
  46. #endif
  47. #ifdef _BSD_SOURCE
  48. size_t strlcat (char *, const char *, size_t);
  49. size_t strlcpy (char *, const char *, size_t);
  50. #endif
  51. #ifdef _GNU_SOURCE
  52. int strcasecmp (const char *, const char *);
  53. int strncasecmp (const char *, const char *, size_t);
  54. char *strchrnul(const char *, int);
  55. char *strcasestr(const char *, const char *);
  56. #endif
  57. #ifdef __cplusplus
  58. }
  59. #endif
  60. #endif