11 #ifndef _LIBCPP_STRING_H
12 #define _LIBCPP_STRING_H
57 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
58 #pragma GCC system_header
61 #include_next <string.h>
66 #if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_MSVCRT) || \
67 defined(__sun__) || defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_)
68 #define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS
71 #if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
73 inline _LIBCPP_INLINE_VISIBILITY
74 char* __libcpp_strchr(
const char* __s,
int __c) {
return (
char*)strchr(__s, __c);}
75 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
76 const char* strchr(
const char* __s,
int __c) {
return __libcpp_strchr(__s, __c);}
77 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
78 char* strchr(
char* __s,
int __c) {
return __libcpp_strchr(__s, __c);}
80 inline _LIBCPP_INLINE_VISIBILITY
81 char* __libcpp_strpbrk(
const char* __s1,
const char* __s2) {
return (
char*)strpbrk(__s1, __s2);}
82 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
83 const char* strpbrk(
const char* __s1,
const char* __s2) {
return __libcpp_strpbrk(__s1, __s2);}
84 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
85 char* strpbrk(
char* __s1,
const char* __s2) {
return __libcpp_strpbrk(__s1, __s2);}
87 inline _LIBCPP_INLINE_VISIBILITY
88 char* __libcpp_strrchr(
const char* __s,
int __c) {
return (
char*)strrchr(__s, __c);}
89 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
90 const char* strrchr(
const char* __s,
int __c) {
return __libcpp_strrchr(__s, __c);}
91 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
92 char* strrchr(
char* __s,
int __c) {
return __libcpp_strrchr(__s, __c);}
94 inline _LIBCPP_INLINE_VISIBILITY
95 void* __libcpp_memchr(
const void* __s,
int __c,
size_t __n) {
return (
void*)memchr(__s, __c, __n);}
96 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
97 const void* memchr(
const void* __s,
int __c,
size_t __n) {
return __libcpp_memchr(__s, __c, __n);}
98 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
99 void* memchr(
void* __s,
int __c,
size_t __n) {
return __libcpp_memchr(__s, __c, __n);}
101 inline _LIBCPP_INLINE_VISIBILITY
102 char* __libcpp_strstr(
const char* __s1,
const char* __s2) {
return (
char*)strstr(__s1, __s2);}
103 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
104 const char* strstr(
const char* __s1,
const char* __s2) {
return __libcpp_strstr(__s1, __s2);}
105 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
106 char* strstr(
char* __s1,
const char* __s2) {
return __libcpp_strstr(__s1, __s2);}
110 #endif // _LIBCPP_STRING_H