File indexing completed on 2026-05-03 08:14:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP_STRING_H
0011 #define _LIBCPP_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 #if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0055 # include <__cxx03/string.h>
0056 #else
0057 # include <__config>
0058
0059 # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0060 # pragma GCC system_header
0061 # endif
0062
0063 # if __has_include_next(<string.h>)
0064 # include_next <string.h>
0065 # endif
0066
0067
0068
0069
0070 # if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_MSVCRT) || \
0071 defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_)
0072 # define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS
0073 # endif
0074
0075 # if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
0076 extern "C++" {
0077 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strchr(const char* __s, int __c) {
0078 return __builtin_strchr(__s, __c);
0079 }
0080 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strchr(char* __s, int __c) {
0081 return __builtin_strchr(__s, __c);
0082 }
0083
0084 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strpbrk(const char* __s1, const char* __s2) {
0085 return __builtin_strpbrk(__s1, __s2);
0086 }
0087 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strpbrk(char* __s1, const char* __s2) {
0088 return __builtin_strpbrk(__s1, __s2);
0089 }
0090
0091 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strrchr(const char* __s, int __c) {
0092 return __builtin_strrchr(__s, __c);
0093 }
0094 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strrchr(char* __s, int __c) {
0095 return __builtin_strrchr(__s, __c);
0096 }
0097
0098 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const void* memchr(const void* __s, int __c, size_t __n) {
0099 return __builtin_memchr(__s, __c, __n);
0100 }
0101 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD void* memchr(void* __s, int __c, size_t __n) {
0102 return __builtin_memchr(__s, __c, __n);
0103 }
0104
0105 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD const char* strstr(const char* __s1, const char* __s2) {
0106 return __builtin_strstr(__s1, __s2);
0107 }
0108 inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD char* strstr(char* __s1, const char* __s2) {
0109 return __builtin_strstr(__s1, __s2);
0110 }
0111 }
0112 # endif
0113 #endif
0114
0115 #endif