File indexing completed on 2026-05-03 08:13:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___CXX03_STRING_H
0011 #define _LIBCPP___CXX03_STRING_H
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054 #include <__cxx03/__config>
0055
0056 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0057 # pragma GCC system_header
0058 #endif
0059
0060 #if __has_include_next(<string.h>)
0061 # include_next <string.h>
0062 #endif
0063
0064
0065
0066
0067 #if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_MSVCRT) || defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_)
0068 # define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS
0069 #endif
0070
0071 #if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
0072 extern "C++" {
0073 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strchr(const char* __s, int __c) {
0074 return __builtin_strchr(__s, __c);
0075 }
0076 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strchr(char* __s, int __c) {
0077 return __builtin_strchr(__s, __c);
0078 }
0079
0080 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strpbrk(const char* __s1, const char* __s2) {
0081 return __builtin_strpbrk(__s1, __s2);
0082 }
0083 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strpbrk(char* __s1, const char* __s2) {
0084 return __builtin_strpbrk(__s1, __s2);
0085 }
0086
0087 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strrchr(const char* __s, int __c) {
0088 return __builtin_strrchr(__s, __c);
0089 }
0090 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strrchr(char* __s, int __c) {
0091 return __builtin_strrchr(__s, __c);
0092 }
0093
0094 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {
0095 return __builtin_memchr(__s, __c, __n);
0096 }
0097 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
0098 return __builtin_memchr(__s, __c, __n);
0099 }
0100
0101 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strstr(const char* __s1, const char* __s2) {
0102 return __builtin_strstr(__s1, __s2);
0103 }
0104 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strstr(char* __s1, const char* __s2) {
0105 return __builtin_strstr(__s1, __s2);
0106 }
0107 }
0108 #endif
0109
0110 #endif