string.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 *memset (void *, int, size_t);
  17. int memcmp (const void *, const void *, size_t);
  18. void *memchr (const void *, int, size_t);
  19. char *strcpy (char *, const char *);
  20. char *strncpy (char *, const char *, size_t);
  21. char *strcat (char *, const char *);
  22. char *strncat (char *, const char *, size_t);
  23. int strcmp (const char *, const char *);
  24. int strncmp (const char *, const char *, size_t);
  25. int strcoll (const char *, const char *);
  26. size_t strxfrm (char *, const char *, size_t);
  27. char *strchr (const char *, int);
  28. char *strrchr (const char *, int);
  29. size_t strcspn (const char *, const char *);
  30. size_t strspn (const char *, const char *);
  31. char *strpbrk (const char *, const char *);
  32. char *strstr (const char *, const char *);
  33. char *strtok (char *, const char *);
  34. size_t strlen (const char *);
  35. char *strerror (int);
  36. #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  37. || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
  38. char *strtok_r (char *, const char *, char **);
  39. int strerror_r (int, char *, size_t);
  40. char *stpcpy(char *, const char *);
  41. char *stpncpy(char *, const char *, size_t);
  42. size_t strnlen (const char *, size_t);
  43. char *strdup (const char *);
  44. char *strndup (const char *, size_t);
  45. char *strsignal(int);
  46. #endif
  47. #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
  48. void *memccpy (void *, const void *, int, size_t);
  49. #endif
  50. #ifdef _BSD_SOURCE
  51. size_t strlcat (char *, const char *, size_t);
  52. size_t strlcpy (char *, const char *, size_t);
  53. #endif
  54. #ifdef _GNU_SOURCE
  55. int strcasecmp (const char *, const char *);
  56. int strncasecmp (const char *, const char *, size_t);
  57. char *strchrnul(const char *, int);
  58. char *strcasestr(const char *, const char *);
  59. #endif
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif