cstring 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_CSTRING
  10. #define _LIBCPP_CSTRING
  11. /*
  12. cstring synopsis
  13. Macros:
  14. NULL
  15. namespace std
  16. {
  17. Types:
  18. size_t
  19. void* memcpy(void* restrict s1, const void* restrict s2, size_t n);
  20. void* memmove(void* s1, const void* s2, size_t n);
  21. char* strcpy (char* restrict s1, const char* restrict s2);
  22. char* strncpy(char* restrict s1, const char* restrict s2, size_t n);
  23. char* strcat (char* restrict s1, const char* restrict s2);
  24. char* strncat(char* restrict s1, const char* restrict s2, size_t n);
  25. int memcmp(const void* s1, const void* s2, size_t n);
  26. int strcmp (const char* s1, const char* s2);
  27. int strncmp(const char* s1, const char* s2, size_t n);
  28. int strcoll(const char* s1, const char* s2);
  29. size_t strxfrm(char* restrict s1, const char* restrict s2, size_t n);
  30. const void* memchr(const void* s, int c, size_t n);
  31. void* memchr( void* s, int c, size_t n);
  32. const char* strchr(const char* s, int c);
  33. char* strchr( char* s, int c);
  34. size_t strcspn(const char* s1, const char* s2);
  35. const char* strpbrk(const char* s1, const char* s2);
  36. char* strpbrk( char* s1, const char* s2);
  37. const char* strrchr(const char* s, int c);
  38. char* strrchr( char* s, int c);
  39. size_t strspn(const char* s1, const char* s2);
  40. const char* strstr(const char* s1, const char* s2);
  41. char* strstr( char* s1, const char* s2);
  42. char* strtok(char* restrict s1, const char* restrict s2);
  43. void* memset(void* s, int c, size_t n);
  44. char* strerror(int errnum);
  45. size_t strlen(const char* s);
  46. } // std
  47. */
  48. #include <__config>
  49. #include <string.h>
  50. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  51. # pragma GCC system_header
  52. #endif
  53. _LIBCPP_BEGIN_NAMESPACE_STD
  54. using ::size_t _LIBCPP_USING_IF_EXISTS;
  55. using ::memcpy _LIBCPP_USING_IF_EXISTS;
  56. using ::memmove _LIBCPP_USING_IF_EXISTS;
  57. using ::strcpy _LIBCPP_USING_IF_EXISTS;
  58. using ::strncpy _LIBCPP_USING_IF_EXISTS;
  59. using ::strcat _LIBCPP_USING_IF_EXISTS;
  60. using ::strncat _LIBCPP_USING_IF_EXISTS;
  61. using ::memcmp _LIBCPP_USING_IF_EXISTS;
  62. using ::strcmp _LIBCPP_USING_IF_EXISTS;
  63. using ::strncmp _LIBCPP_USING_IF_EXISTS;
  64. using ::strcoll _LIBCPP_USING_IF_EXISTS;
  65. using ::strxfrm _LIBCPP_USING_IF_EXISTS;
  66. using ::memchr _LIBCPP_USING_IF_EXISTS;
  67. using ::strchr _LIBCPP_USING_IF_EXISTS;
  68. using ::strcspn _LIBCPP_USING_IF_EXISTS;
  69. using ::strpbrk _LIBCPP_USING_IF_EXISTS;
  70. using ::strrchr _LIBCPP_USING_IF_EXISTS;
  71. using ::strspn _LIBCPP_USING_IF_EXISTS;
  72. using ::strstr _LIBCPP_USING_IF_EXISTS;
  73. using ::strtok _LIBCPP_USING_IF_EXISTS;
  74. using ::memset _LIBCPP_USING_IF_EXISTS;
  75. using ::strerror _LIBCPP_USING_IF_EXISTS;
  76. using ::strlen _LIBCPP_USING_IF_EXISTS;
  77. _LIBCPP_END_NAMESPACE_STD
  78. #endif // _LIBCPP_CSTRING