22 #define _NLSCMPERROR _CRT_INT_MAX // currently == INT_MAX
24 #if __STDC_WANT_SECURE_LIB__
44 _In_ int _ErrorNumber);
69 #endif // __STDC_WANT_SECURE_LIB__
87 #pragma warning(disable: 28719) // __WARNING_BANNED_API_USAGE
88 #pragma warning(disable: 28726) // __WARNING_BANNED_API_USAGEL2
106 _In_z_ char const* _String1,
112 _In_z_ char const* _String1,
118 _In_z_ char const* _String1,
129 #pragma warning(push)
130 #pragma warning(disable: 28719) // __WARNING_BANNED_API_USAGE
131 #pragma warning(disable: 28726) // __WARNING_BANNED_API_USAGEL2
142 _In_z_ char const* _Control
145 #if defined _DEBUG && defined _CRTDBG_MAP_ALLOC
146 #pragma push_macro("_strdup")
155 #if defined _DEBUG && defined _CRTDBG_MAP_ALLOC
156 #pragma pop_macro("_strdup")
169 _In_ size_t _SizeInBytes,
182 _In_ int _ErrorMessage
188 _In_ int, _ErrorMessage
193 _In_z_ char const* _String1,
199 _In_z_ char const* _String1,
205 _In_z_ char const* _String1,
206 _In_z_ char const* _String2,
212 _In_z_ char const* _String1,
213 _In_z_ char const* _String2,
284 _In_ size_t _MaxCount
291 _In_ size_t _MaxCount,
299 _In_ size_t _MaxCount
306 _In_ size_t _MaxCount,
314 _In_ size_t _MaxCount
321 _In_ size_t _MaxCount,
347 _MaxCount > _String_length_(_String),
351 _MaxCount <= _String_length_(_String),
356 _In_ size_t _MaxCount
359 #if __STDC_WANT_SECURE_LIB__ && !defined __midl
363 _MaxCount > _String_length_(_String),
367 _MaxCount <= _String_length_(_String),
370 static __inline
size_t __CRTDECL strnlen_s(
372 _In_ size_t _MaxCount
375 return _String == 0 ? 0 : strnlen(_String, _MaxCount);
383 _In_ size_t _SizeInBytes,
385 _In_ size_t _MaxCount
406 _In_z_ char const* _Control
435 _In_z_ char const* _Control
484 _In_z_ char const* _Source,
492 _In_z_ char const* _Source,
505 return const_cast<char*
>(
strchr(static_cast<char const*>(_String), _Ch));
511 return const_cast<char*
>(
strpbrk(static_cast<char const*>(_String), _Control));
517 return const_cast<char*
>(
strrchr(static_cast<char const*>(_String), _Ch));
523 return const_cast<char*
>(
strstr(static_cast<char const*>(_String), _SubString));
526 #endif // __cplusplus
530 #if _CRT_INTERNAL_NONSTDC_NAMES
532 #if defined _DEBUG && defined _CRTDBG_MAP_ALLOC
533 #pragma push_macro("strdup")
542 #if defined _DEBUG && defined _CRTDBG_MAP_ALLOC
543 #pragma pop_macro("strdup")
549 _In_z_ char const* _String1,
550 _In_z_ char const* _String2
555 _In_z_ char const* _String1,
556 _In_z_ char const* _String2
561 _Inout_z_
char* _String
568 _In_ size_t _MaxCount
575 _In_ size_t _MaxCount
580 _Inout_z_
char* _String
585 _Inout_z_
char* _String,
590 _Inout_z_
char* _String
593 #endif // _CRT_INTERNAL_NONSTDC_NAMES
_strlwr_l
Definition: string.h:252
return
Definition: corecrt_memcpy_s.h:60
Definition: corecrt.h:489
_In_z_ char const _In_ _In_opt_ _locale_t _Locale
Definition: string.h:495
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
Definition: corecrt.h:1795
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
Definition: corecrt.h:712
_In_opt_ _Locale __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(errno_t, strncat_s, _Prepost_z_ char, _Destination, _In_reads_or_z_(_Count) char const *, _Source, _In_ size_t, _Count) __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX(char *
_strupr
Definition: string.h:456
_In_ _Value _Check_return_ _ACRTIMP size_t __cdecl strspn(_In_z_ char const *_Str, _In_z_ char const *_Control)
_Out_writes_opt_(_MaxCount)
char *__cdecl strset(_Inout_z_ char *_String, _In_ int _Value)
strncpy_s
Definition: string.h:338
#define _Check_return_opt_
Definition: corecrt.h:96
#define _Ret_z_
Definition: sal.h:521
#define _Ret_maybenull_
Definition: sal.h:526
_Check_return_ _ACRTIMP int __cdecl _strnicoll(_In_reads_or_z_(_MaxCount) char const *_String1, _In_reads_or_z_(_MaxCount) char const *_String2, _In_ size_t _MaxCount)
int errno_t
Definition: corecrt.h:476
#define _Check_return_wat_
Definition: corecrt.h:102
_In_opt_ _Locale _In_reads_or_z_(_Count) char const *
size_t rsize_t
Definition: corecrt.h:527
_In_opt_ _Locale strncat
Definition: string.h:266
_Inout_updates_z_(_String_length_(_Destination)+_String_length_(_Source)+1)
_Check_return_ _ACRTIMP int __cdecl _strcoll_l(_In_z_ char const *_String1, _In_z_ char const *_String2, _In_opt_ _locale_t _Locale)
__EMPTY_DECLSPEC
Definition: string.h:90
_Check_return_ size_t __cdecl strlen(_In_z_ char const *_Str)
_Check_return_wat_ _ACRTIMP errno_t __cdecl _strupr_s(_Inout_updates_z_(_Size) char *_String, _In_ size_t _Size)
_Out_writes_z_(_String_length_(_Source)+1)
_CRT_BEGIN_C_HEADER _Check_return_ _Ret_maybenull_ _In_ size_t _Size
Definition: corecrt_malloc.h:58
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
strcpy
Definition: string.h:133
_Check_return_ _CRT_NONSTDC_DEPRECATE(_strdup) _ACRTIMP char *__cdecl strdup(_In_opt_z_ char const *_String)
_Check_return_wat_ _ACRTIMP errno_t __cdecl _strset_s(_Inout_updates_z_(_DestinationSize) char *_Destination, _In_ size_t _DestinationSize, _In_ int _Value)
_ACRTIMP char *__cdecl strrev(_Inout_z_ char *_String)
_strupr_l
Definition: string.h:474
#define _Out_writes_bytes_opt_(size)
Definition: sal.h:348
_Out_writes_(_Count) _Post_maybez_
#define __CRTDECL
Definition: vcruntime.h:156
_In_z_ char const _Source _Check_return_ _ACRTIMP size_t __cdecl strcspn(_In_z_ char const *_Str, _In_z_ char const *_Control)
_In_z_ char const * _String2
Definition: string.h:195
_ACRTIMP size_t __cdecl __strncnt(_In_reads_or_z_(_Count) char const *_String, _In_ size_t _Count)
#define _Post_z_
Definition: sal.h:688
_In_ _Count _Check_return_ _In_ size_t _MaxCount
Definition: string.h:357
#define _In_opt_z_
Definition: sal.h:311
_In_z_ char const _Source _Check_return_ int __cdecl strcmp(_In_z_ char const *_Str1, _In_z_ char const *_Str2)
_SourceSize void *const _In_ rsize_t const _DestinationSize
Definition: corecrt_memcpy_s.h:36
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(errno_t, _strlwr_s, _Prepost_z_ char, _String) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(char *
_strnset_s
Definition: string.h:396
#define _Check_return_
Definition: sal.h:554
_Check_return_ _Ret_maybenull_ _VCRTIMP char _CONST_RETURN *__cdecl strstr(_In_z_ char const *_Str, _In_z_ char const *_SubStr)
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_Check_return_ _ACRTIMP _CRTALLOCATOR char *__cdecl _strdup(_In_opt_z_ char const *_Source)
#define _In_z_
Definition: sal.h:310
#define _In_
Definition: sal.h:305
_In_opt_ _Locale _In_ _Count _Check_return_ _ACRTIMP int __cdecl strncmp(_In_reads_or_z_(_MaxCount) char const *_Str1, _In_reads_or_z_(_MaxCount) char const *_Str2, _In_ size_t _MaxCount)
_Check_return_ _ACRTIMP int __cdecl _strnicmp(_In_reads_or_z_(_MaxCount) char const *_String1, _In_reads_or_z_(_MaxCount) char const *_String2, _In_ size_t _MaxCount)
_Check_return_ _ACRTIMP int __cdecl _strnicmp_l(_In_reads_or_z_(_MaxCount) char const *_String1, _In_reads_or_z_(_MaxCount) char const *_String2, _In_ size_t _MaxCount, _In_opt_ _locale_t _Locale)
_Check_return_ _ACRTIMP int __cdecl _strncoll(_In_reads_or_z_(_MaxCount) char const *_String1, _In_reads_or_z_(_MaxCount) char const *_String2, _In_ size_t _MaxCount)
#define _CONST_RETURN
Definition: corecrt.h:79
#define _In_opt_
Definition: sal.h:306
_Check_return_ _ACRTIMP int __cdecl _strncoll_l(_In_reads_or_z_(_MaxCount) char const *_String1, _In_reads_or_z_(_MaxCount) char const *_String2, _In_ size_t _MaxCount, _In_opt_ _locale_t _Locale)
#define _Inout_opt_z_
Definition: sal.h:381
strncpy
Definition: string.h:338
_ACRTIMP char *__cdecl strnset(_Inout_updates_z_(_MaxCount) char *_String, _In_ int _Value, _In_ size_t _MaxCount)
__RETURN_POLICY_DST
Definition: string.h:90
_Check_return_wat_ *_SizeRead wchar_t * _Buffer
Definition: corecrt_wconio.h:27
#define _Deref_prepost_opt_z_
Definition: sal.h:1421
_In_ size_t _Out_opt_ int _In_z_ unsigned char const * _Src
Definition: mbstring.h:1039
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(errno_t, strcat_s, char, _Destination, _In_z_ char const *, _Source) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(char *
_Check_return_wat_ _ACRTIMP errno_t __cdecl strerror_s(_Out_writes_z_(_SizeInBytes) char *_Buffer, _In_ size_t _SizeInBytes, _In_ int _ErrorNumber)
#define _CRTALLOCATOR
Definition: corecrt.h:56
_Check_return_ _CRT_INSECURE_DEPRECATE(strtok_s) _ACRTIMP char *__cdecl strtok(_Inout_opt_z_ char *_String
_ACRTIMP char *__cdecl strlwr(_Inout_z_ char *_String)
_Check_return_ _In_z_ char const * _Delimiter
Definition: string.h:442
_In_opt_ _Locale strncat_s
Definition: string.h:266
#define _CRT_INT_MAX
Definition: corecrt.h:144
_Check_return_ _VCRTIMP char _CONST_RETURN *__cdecl strrchr(_In_z_ char const *_Str, _In_ int _Ch)
#define _Prepost_z_
Definition: sal.h:705
_strlwr_s_l
Definition: string.h:252
_ACRTIMP char *__cdecl _strrev(_Inout_z_ char *_Str)
_Destination
Definition: string.h:91
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
_In_ _Count _Check_return_ _Post_satisfies_(return==_MaxCount)) _ACRTIMP size_t __cdecl strnlen(_In_reads_or_z_(_MaxCount) char const *_String
_Check_return_ _In_z_ wchar_t const _Inout_opt_ _Deref_prepost_opt_z_ wchar_t ** _Context
Definition: corecrt_wstring.h:228
_strnset
Definition: string.h:396
_strupr_s_l
Definition: string.h:474
_Check_return_wat_ _ACRTIMP errno_t __cdecl _strerror_s(_Out_writes_z_(_SizeInBytes) char *_Buffer, _In_ size_t _SizeInBytes, _In_opt_z_ char const *_ErrorMessage)
_Check_return_ _ACRTIMP int __cdecl _strnicoll_l(_In_reads_or_z_(_MaxCount) char const *_String1, _In_reads_or_z_(_MaxCount) char const *_String2, _In_ size_t _MaxCount, _In_opt_ _locale_t _Locale)
_String
Definition: string.h:254
_Check_return_wat_ _ACRTIMP errno_t __cdecl strcat_s(_Inout_updates_z_(_SizeInBytes) char *_Destination, _In_ rsize_t _SizeInBytes, _In_z_ char const *_Source)
_In_ _In_ _Count _Check_return_ _ACRTIMP char _CONST_RETURN *__cdecl strpbrk(_In_z_ char const *_Str, _In_z_ char const *_Control)
_ACRTIMP void *__cdecl _memccpy(_Out_writes_bytes_opt_(_MaxCount) void *_Dst, _In_ void const *_Src, _In_ int _Val, _In_ size_t _MaxCount)
_ACRTIMP char *__cdecl strupr(_Inout_z_ char *_String)
_Check_return_ _VCRTIMP char _CONST_RETURN *__cdecl strchr(_In_z_ char const *_Str, _In_ int _Val)
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst)
Definition: corecrt.h:709
_Check_return_wat_ _ACRTIMP errno_t __cdecl strcpy_s(_Out_writes_z_(_SizeInBytes) char *_Destination, _In_ rsize_t _SizeInBytes, _In_z_ char const *_Source)
_Check_return_ _ACRTIMP int __cdecl _stricoll_l(_In_z_ char const *_String1, _In_z_ char const *_String2, _In_opt_ _locale_t _Locale)
_Check_return_ _ACRTIMP char *__cdecl strtok_s(_Inout_opt_z_ char *_String, _In_z_ char const *_Delimiter, _Inout_ _Deref_prepost_opt_z_ char **_Context)
_Check_return_wat_ _ACRTIMP errno_t __cdecl _strlwr_s(_Inout_updates_z_(_Size) char *_String, _In_ size_t _Size)
#define __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SecureFuncName, _SecureDstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
Definition: corecrt.h:1836
_In_opt_ _Locale _In_z_ char const _In_ _In_range_(<=, _CRT_INT_MAX) size_t _MaxCount)
_Diff _Count
Definition: algorithm:1941
_strlwr
Definition: string.h:234
#define _Inout_
Definition: sal.h:375
_In_ _Count _Check_return_ _When_(_MaxCount > _String_length_(_String), _Post_satisfies_(return==_String_length_(_String))) _When_(_MaxCount<
_Check_return_ _ACRTIMP int __cdecl _strcmpi(_In_z_ char const *_String1, _In_z_ char const *_String2)
_strset
Definition: string.h:427
_Check_return_ _ACRTIMP int __cdecl _stricoll(_In_z_ char const *_String1, _In_z_ char const *_String2)
_FwdIt const _Ty _Val
Definition: algorithm:1938
_In_ _Value
Definition: string.h:398
_ACRTIMP
Definition: string.h:234
_Inout_z_
Definition: string.h:234
return strtok(_String, _Delimiters)
_In_opt_ _Locale _Source
Definition: string.h:269
_In_ int _SizeInBytes
Definition: direct.h:61
strcat
Definition: string.h:90
_Ret_z_ _Success_(return!=0) _Check_return_ _CRT_INSECURE_DEPRECATE(_strerror_s) _ACRTIMP char *__cdecl _strerror(_In_opt_z_ char const *_ErrorMessage)
_Check_return_ _ACRTIMP int __cdecl _stricmp_l(_In_z_ char const *_String1, _In_z_ char const *_String2, _In_opt_ _locale_t _Locale)
#define _Post_maybez_
Definition: sal.h:1369
_Check_return_ _ACRTIMP int __cdecl strcoll(_In_z_ char const *_String1, _In_z_ char const *_String2)