1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the w64 mingw-runtime package. 4 * No warranty is given; refer to the file DISCLAIMER within this package. 5 */ 6 #ifndef _INC_STRING 7 #define _INC_STRING 8 9 #include <corecrt.h> 10 11 #define __CORRECT_ISO_CPP_STRING_H_PROTO // For stl 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 #ifndef _NLSCMP_DEFINED 18 #define _NLSCMP_DEFINED 19 #define _NLSCMPERROR 2147483647 20 #endif 21 22 #ifndef _CRT_MEMORY_DEFINED 23 #define _CRT_MEMORY_DEFINED 24 25 _CRTIMP 26 void* 27 __cdecl 28 _memccpy( 29 _Out_writes_bytes_opt_(_MaxCount) void *_Dst, 30 _In_ const void *_Src, 31 _In_ int _Val, 32 _In_ size_t _MaxCount); 33 34 _CRT_DISABLE_GCC_WARNINGS 35 _Must_inspect_result_ 36 _CRTIMP 37 _CONST_RETURN 38 void* 39 __cdecl 40 memchr( 41 _In_reads_bytes_opt_(_MaxCount) const void *_Buf, 42 _In_ int _Val, 43 _In_ size_t _MaxCount); 44 _CRT_RESTORE_GCC_WARNINGS 45 46 #if defined __cplusplus 47 extern "C++" _Must_inspect_result_ 48 inline void* __CRTDECL memchr( 49 _In_reads_bytes_opt_(_MaxCount) void *_Buf, 50 _In_ int _Val, 51 _In_ size_t _MaxCount) 52 { 53 const void *_Bufc = _Buf; 54 return const_cast<void*>(memchr(_Bufc, _Val, _MaxCount)); 55 } 56 #endif 57 58 _Must_inspect_result_ 59 _CRTIMP 60 int 61 __cdecl 62 _memicmp( 63 _In_reads_bytes_opt_(_Size) const void *_Buf1, 64 _In_reads_bytes_opt_(_Size) const void *_Buf2, 65 _In_ size_t _Size); 66 67 _Must_inspect_result_ 68 _CRTIMP 69 int 70 __cdecl 71 _memicmp_l( 72 _In_reads_bytes_opt_(_Size) const void *_Buf1, 73 _In_reads_bytes_opt_(_Size) const void *_Buf2, 74 _In_ size_t _Size, 75 _In_opt_ _locale_t _Locale); 76 77 _Must_inspect_result_ 78 int 79 __cdecl 80 memcmp( 81 _In_reads_bytes_(_Size) const void *_Buf1, 82 _In_reads_bytes_(_Size) const void *_Buf2, 83 _In_ size_t _Size); 84 85 _Post_equal_to_(_Dst) 86 _At_buffer_((unsigned char*)_Dst, 87 _Iter_, 88 _MaxCount, 89 _Post_satisfies_(((unsigned char*)_Dst)[_Iter_] == ((unsigned char*)_Src)[_Iter_])) 90 _CRT_INSECURE_DEPRECATE_MEMORY(memcpy_s) 91 void* 92 __cdecl 93 memcpy( 94 _Out_writes_bytes_all_(_MaxCount) void *_Dst, 95 _In_reads_bytes_(_MaxCount) const void *_Src, 96 _In_ size_t _MaxCount); 97 98 _Post_equal_to_(_Dst) 99 _At_buffer_((unsigned char*)_Dst, 100 _Iter_, 101 _Size, 102 _Post_satisfies_(((unsigned char*)_Dst)[_Iter_] == _Val)) 103 void* 104 __cdecl 105 memset( 106 _Out_writes_bytes_all_(_Size) void *_Dst, 107 _In_ int _Val, 108 _In_ size_t _Size); 109 110 #ifndef NO_OLDNAMES 111 112 _CRTIMP 113 _CRT_NONSTDC_DEPRECATE(_memccpy) 114 void* 115 __cdecl 116 memccpy( 117 _Out_writes_bytes_opt_(_Size) void *_Dst, 118 _In_reads_bytes_opt_(_Size) const void *_Src, 119 _In_ int _Val, 120 _In_ size_t _Size); 121 122 _Check_return_ 123 _CRTIMP 124 _CRT_NONSTDC_DEPRECATE(_memicmp) 125 int 126 __cdecl 127 memicmp( 128 _In_reads_bytes_opt_(_Size) const void *_Buf1, 129 _In_reads_bytes_opt_(_Size) const void *_Buf2, 130 _In_ size_t _Size); 131 132 #endif /* NO_OLDNAMES */ 133 134 #endif /* _CRT_MEMORY_DEFINED */ 135 136 char* 137 __cdecl 138 _strset( 139 _Inout_z_ char *_Str, 140 _In_ int _Val); 141 142 char* 143 __cdecl 144 strcpy( 145 _Out_writes_z_(_String_length_(_Source) + 1) char *_Dest, 146 _In_z_ const char *_Source); 147 148 char* 149 __cdecl 150 strcat( 151 _Inout_updates_z_(_String_length_(_Dest) + _String_length_(_Source) + 1) char *_Dest, 152 _In_z_ const char *_Source); 153 154 _Check_return_ 155 int 156 __cdecl 157 strcmp( 158 _In_z_ const char *_Str1, 159 _In_z_ const char *_Str2); 160 161 _CRTIMP 162 size_t 163 __cdecl 164 strlen( 165 _In_z_ const char *_Str); 166 167 _When_(_MaxCount > _String_length_(_Str), 168 _Post_satisfies_(return == _String_length_(_Str))) 169 _When_(_MaxCount <= _String_length_(_Str), 170 _Post_satisfies_(return == _MaxCount)) 171 _CRTIMP 172 size_t 173 __cdecl 174 strnlen( 175 _In_reads_or_z_(_MaxCount) const char *_Str, 176 _In_ size_t _MaxCount); 177 178 _CRT_INSECURE_DEPRECATE_MEMORY(memmove_s) 179 void* 180 __cdecl 181 memmove( 182 _Out_writes_bytes_all_opt_(_MaxCount) void *_Dst, 183 _In_reads_bytes_opt_(_MaxCount) const void *_Src, 184 _In_ size_t _MaxCount); 185 186 _Check_return_ 187 _CRTIMP 188 char* 189 __cdecl 190 _strdup( 191 _In_opt_z_ const char *_Src); 192 193 _CRT_DISABLE_GCC_WARNINGS 194 _Check_return_ 195 _CRTIMP 196 _CONST_RETURN 197 char* 198 __cdecl 199 strchr( 200 _In_z_ const char *_Str, 201 _In_ int _Val); 202 _CRT_RESTORE_GCC_WARNINGS 203 204 #ifdef __cplusplus 205 extern "C++" 206 _Check_return_ 207 inline char* __CRTDECL strchr(_In_z_ char *_String, _In_ int _Ch) 208 { 209 return const_cast<char*>(strchr(static_cast<const char*>(_String), _Ch)); 210 } 211 #endif // __cplusplus 212 213 _Check_return_ 214 _CRTIMP 215 int 216 __cdecl 217 _stricmp( 218 _In_z_ const char *_Str1, 219 _In_z_ const char *_Str2); 220 221 _Check_return_ 222 _CRTIMP 223 int 224 __cdecl 225 _strcmpi( 226 _In_z_ const char *_Str1, 227 _In_z_ const char *_Str2); 228 229 _Check_return_ 230 _CRTIMP 231 int 232 __cdecl 233 _stricmp_l( 234 _In_z_ const char *_Str1, 235 _In_z_ const char *_Str2, 236 _In_opt_ _locale_t _Locale); 237 238 _Check_return_ 239 _CRTIMP 240 int 241 __cdecl 242 strcoll( 243 _In_z_ const char *_Str1, 244 _In_z_ const char *_Str2); 245 246 _Check_return_ 247 _CRTIMP 248 int 249 __cdecl 250 _strcoll_l( 251 _In_z_ const char *_Str1, 252 _In_z_ const char *_Str2, 253 _In_opt_ _locale_t _Locale); 254 255 _Check_return_ 256 _CRTIMP 257 int 258 __cdecl 259 _stricoll( 260 _In_z_ const char *_Str1, 261 _In_z_ const char *_Str2); 262 263 _Check_return_ 264 _CRTIMP 265 int 266 __cdecl 267 _stricoll_l( 268 _In_z_ const char *_Str1, 269 _In_z_ const char *_Str2, 270 _In_opt_ _locale_t _Locale); 271 272 _Check_return_ 273 _CRTIMP 274 int 275 __cdecl 276 _strncoll( 277 _In_z_ const char *_Str1, 278 _In_z_ const char *_Str2, 279 _In_ size_t _MaxCount); 280 281 _Check_return_ 282 _CRTIMP 283 int 284 __cdecl 285 _strncoll_l( 286 _In_z_ const char *_Str1, 287 _In_z_ const char *_Str2, 288 _In_ size_t _MaxCount, 289 _In_opt_ _locale_t _Locale); 290 291 _Check_return_ 292 _CRTIMP 293 int 294 __cdecl 295 _strnicoll( 296 _In_z_ const char *_Str1, 297 _In_z_ const char *_Str2, 298 _In_ size_t _MaxCount); 299 300 _Check_return_ 301 _CRTIMP 302 int 303 __cdecl 304 _strnicoll_l( 305 _In_z_ const char *_Str1, 306 _In_z_ const char *_Str2, 307 _In_ size_t _MaxCount, 308 _In_opt_ _locale_t _Locale); 309 310 _Check_return_ 311 _CRTIMP 312 size_t 313 __cdecl 314 strcspn( 315 _In_z_ const char *_Str, 316 _In_z_ const char *_Control); 317 318 _Check_return_ 319 _CRTIMP 320 _CRT_INSECURE_DEPRECATE(_strerror_s) 321 char* 322 __cdecl 323 _strerror( 324 _In_opt_z_ const char *_ErrMsg); 325 326 _Check_return_ 327 _CRTIMP 328 _CRT_INSECURE_DEPRECATE(strerror_s) 329 char* 330 __cdecl 331 strerror( 332 _In_ int); 333 334 _CRTIMP 335 char* 336 __cdecl 337 _strlwr( 338 _Inout_z_ char *_String); 339 340 char* 341 strlwr_l( 342 char *_String, 343 _locale_t _Locale); 344 345 char* 346 __cdecl 347 strncat( 348 char *_Dest, 349 const char *_Source, 350 size_t _Count); 351 352 _Check_return_ 353 int 354 __cdecl 355 strncmp( 356 _In_reads_or_z_(_MaxCount) const char *_Str1, 357 _In_reads_or_z_(_MaxCount) const char *_Str2, 358 _In_ size_t _MaxCount); 359 360 _Check_return_ 361 _CRTIMP 362 int 363 __cdecl 364 _strnicmp( 365 _In_reads_or_z_(_MaxCount) const char *_Str1, 366 _In_reads_or_z_(_MaxCount) const char *_Str2, 367 _In_ size_t _MaxCount); 368 369 _Check_return_ 370 _CRTIMP 371 int 372 __cdecl 373 _strnicmp_l( 374 _In_reads_or_z_(_MaxCount) const char *_Str1, 375 _In_reads_or_z_(_MaxCount) const char *_Str2, 376 _In_ size_t _MaxCount, 377 _In_opt_ _locale_t _Locale); 378 379 char* 380 __cdecl 381 strncpy( 382 char *_Dest, 383 const char *_Source, 384 size_t _Count); 385 386 _CRTIMP 387 _CRT_INSECURE_DEPRECATE_CORE(_strnset_s) 388 char* 389 __cdecl 390 _strnset( 391 char *_Str, 392 int _Val, 393 size_t _MaxCount); 394 395 _CRT_DISABLE_GCC_WARNINGS 396 _Check_return_ 397 _CRTIMP 398 _CONST_RETURN 399 char* 400 __cdecl 401 strpbrk( 402 _In_z_ const char *_Str, 403 _In_z_ const char *_Control); 404 _CRT_RESTORE_GCC_WARNINGS 405 406 #ifdef __cplusplus 407 extern "C++" 408 _Check_return_ 409 inline char* __CRTDECL strpbrk(_In_z_ char *_String, _In_z_ const char *_Control) 410 { 411 return const_cast<char*>(strpbrk(static_cast<const char*>(_String), _Control)); 412 } 413 #endif // __cplusplus 414 415 _CRT_DISABLE_GCC_WARNINGS 416 _Check_return_ 417 _CRTIMP 418 _CONST_RETURN 419 char* 420 __cdecl 421 strrchr( 422 _In_z_ const char *_Str, 423 _In_ int _Ch); 424 _CRT_RESTORE_GCC_WARNINGS 425 426 #ifdef __cplusplus 427 extern "C++" 428 _Check_return_ 429 inline char* __CRTDECL strrchr(_In_z_ char *_String, _In_ int _Ch) 430 { 431 return const_cast<char*>(strrchr(static_cast<const char*>(_String), _Ch)); 432 } 433 #endif // __cplusplus 434 435 _CRTIMP 436 char* 437 __cdecl 438 _strrev( 439 _Inout_z_ char *_Str); 440 441 _Check_return_ 442 _CRTIMP 443 size_t 444 __cdecl 445 strspn( 446 _In_z_ const char *_Str, 447 _In_z_ const char *_Control); 448 449 _CRT_DISABLE_GCC_WARNINGS 450 _Check_return_ 451 _CRTIMP 452 _CONST_RETURN 453 char* 454 __cdecl 455 strstr( 456 _In_z_ const char *_Str, 457 _In_z_ const char *_SubStr); 458 _CRT_RESTORE_GCC_WARNINGS 459 460 #ifdef __cplusplus 461 extern "C++" 462 _Check_return_ _Ret_maybenull_ 463 inline char* __CRTDECL strstr(_In_z_ char *_String, _In_z_ const char *_SubString) 464 { 465 return const_cast<char*>(strstr(static_cast<const char*>(_String), _SubString)); 466 } 467 #endif // __cplusplus 468 469 _Check_return_ 470 _CRTIMP 471 _CRT_INSECURE_DEPRECATE_CORE(strtok_s) 472 char* 473 __cdecl 474 strtok( 475 _Inout_opt_z_ char *_Str, 476 _In_z_ const char *_Delim); 477 478 _CRTIMP 479 char* 480 __cdecl 481 _strupr( 482 _Inout_z_ char *_String); 483 484 _CRTIMP 485 char* 486 _strupr_l( 487 char *_String, 488 _locale_t _Locale); 489 490 _Check_return_opt_ 491 _CRTIMP 492 size_t 493 __cdecl 494 strxfrm( 495 _Out_writes_opt_(_MaxCount) _Post_maybez_ char *_Dst, 496 _In_z_ const char *_Src, 497 _In_ size_t _MaxCount); 498 499 _Check_return_opt_ 500 _CRTIMP 501 size_t 502 __cdecl 503 _strxfrm_l( 504 _Out_writes_opt_(_MaxCount) _Post_maybez_ char *_Dst, 505 _In_z_ const char *_Src, 506 _In_ size_t _MaxCount, 507 _In_opt_ _locale_t _Locale); 508 509 #if __STDC_WANT_SECURE_LIB__ 510 511 _Check_return_wat_ 512 _CRTIMP 513 errno_t 514 __cdecl 515 _strset_s( 516 _Inout_updates_z_(_DstSize) char *_Dst, 517 _In_ size_t _DstSize, 518 _In_ int _Value); 519 520 _Check_return_wat_ 521 _CRTIMP 522 errno_t 523 __cdecl 524 _strerror_s( 525 _Out_writes_z_(_SizeInBytes) char *_Buf, 526 _In_ size_t _SizeInBytes, 527 _In_opt_z_ const char *_ErrMsg); 528 529 _Check_return_wat_ 530 _CRTIMP 531 errno_t 532 __cdecl 533 _strlwr_s( 534 _Inout_updates_z_(_Size) char *_Str, 535 _In_ size_t _Size); 536 537 _Check_return_wat_ 538 _CRTIMP 539 errno_t 540 __cdecl 541 _strlwr_s_l( 542 _Inout_updates_z_(_Size) char *_Str, 543 _In_ size_t _Size, 544 _In_opt_ _locale_t _Locale); 545 546 _Check_return_wat_ 547 _CRTIMP 548 errno_t 549 __cdecl 550 _strnset_s( 551 _Inout_updates_z_(_Size) char *_Str, 552 _In_ size_t _Size, 553 _In_ int _Val, 554 _In_ size_t _MaxCount); 555 556 _Check_return_wat_ 557 _CRTIMP 558 errno_t 559 __cdecl 560 _strupr_s( 561 _Inout_updates_z_(_Size) char *_Str, 562 _In_ size_t _Size); 563 564 _Check_return_wat_ 565 _CRTIMP 566 errno_t 567 __cdecl 568 _strupr_s_l( 569 _Inout_updates_z_(_Size) char *_Str, 570 _In_ size_t _Size, 571 _In_opt_ _locale_t _Locale); 572 573 _Check_return_wat_ 574 _CRTIMP 575 errno_t 576 __cdecl 577 strcpy_s( 578 _Out_writes_z_(_Size) char *_Dst, 579 _In_ size_t _Size, 580 _In_z_ const char *_Src); 581 582 _Check_return_wat_ 583 _CRTIMP 584 errno_t 585 __cdecl 586 strcat_s( 587 _Inout_updates_z_(_Size) char *_Dst, 588 _In_ size_t _Size, 589 _In_z_ const char *_Src); 590 591 #endif /* __STDC_WANT_SECURE_LIB__ */ 592 593 #ifndef NO_OLDNAMES 594 595 _Check_return_ 596 _CRTIMP 597 _CRT_NONSTDC_DEPRECATE(_strdup) 598 char* 599 __cdecl 600 strdup( 601 _In_opt_z_ const char *_Src); 602 603 _Check_return_ 604 _CRTIMP 605 _CRT_NONSTDC_DEPRECATE(_strcmpi) 606 int 607 __cdecl 608 strcmpi( 609 _In_z_ const char *_Str1, 610 _In_z_ const char *_Str2); 611 612 _Check_return_ 613 _CRTIMP 614 _CRT_NONSTDC_DEPRECATE(_stricmp) 615 int 616 __cdecl 617 stricmp( 618 _In_z_ const char *_Str1, 619 _In_z_ const char *_Str2); 620 621 _CRTIMP 622 _CRT_NONSTDC_DEPRECATE(_strlwr) 623 char* 624 __cdecl 625 strlwr( 626 _Inout_z_ char *_Str); 627 628 _Check_return_ 629 _CRTIMP 630 _CRT_NONSTDC_DEPRECATE(_strnicmp) 631 int 632 __cdecl 633 strnicmp( 634 _In_z_ const char *_Str1, 635 _In_z_ const char *_Str, 636 _In_ size_t _MaxCount); 637 638 _CRTIMP 639 _CRT_NONSTDC_DEPRECATE(_strnset) 640 char* 641 __cdecl 642 strnset( 643 _Inout_updates_z_(_MaxCount) char *_Str, 644 _In_ int _Val, 645 _In_ size_t _MaxCount); 646 647 _CRTIMP 648 _CRT_NONSTDC_DEPRECATE(_strrev) 649 char* 650 __cdecl 651 strrev( 652 _Inout_z_ char *_Str); 653 654 _CRTIMP 655 _CRT_NONSTDC_DEPRECATE(_strset) 656 char* 657 __cdecl 658 strset( 659 _Inout_z_ char *_Str, 660 _In_ int _Val); 661 662 _CRTIMP 663 _CRT_NONSTDC_DEPRECATE(_strupr) 664 char* 665 __cdecl 666 strupr( 667 _Inout_z_ char *_Str); 668 669 #endif /* NO_OLDNAMES */ 670 671 #ifndef _WSTRING_DEFINED 672 #define _WSTRING_DEFINED 673 674 _Check_return_ 675 _CRTIMP 676 wchar_t* 677 __cdecl 678 _wcsdup( 679 _In_z_ const wchar_t *_Str); 680 681 _CRTIMP 682 _CRT_INSECURE_DEPRECATE(wcscat_s) 683 wchar_t* 684 __cdecl 685 wcscat( 686 _Inout_updates_z_(_String_length_(_Dest) + _String_length_(_Source) + 1) wchar_t *_Dest, 687 _In_z_ const wchar_t *_Source); 688 689 _Check_return_ 690 _When_(return != 0, _Ret_range_(_Str, _Str + _String_length_(_Str) - 1)) 691 _CRTIMP 692 _CONST_RETURN 693 wchar_t* 694 __cdecl 695 wcschr( 696 _In_z_ const wchar_t *_Str, 697 wchar_t _Ch); 698 699 #ifdef __cplusplus 700 extern "C++" 701 _Check_return_ 702 _When_(return != NULL, _Ret_range_(_String, _String + _String_length_(_String) - 1)) 703 inline wchar_t* __CRTDECL wcschr(_In_z_ wchar_t *_String, wchar_t _C) 704 { 705 return const_cast<wchar_t*>(wcschr(static_cast<const wchar_t*>(_String), _C)); 706 } 707 #endif // __cplusplus 708 709 _Check_return_ 710 _CRTIMP 711 int 712 __cdecl 713 wcscmp( 714 _In_z_ const wchar_t *_Str1, 715 _In_z_ const wchar_t *_Str2); 716 717 _CRTIMP 718 _CRT_INSECURE_DEPRECATE(wcscpy_s) 719 wchar_t* 720 __cdecl 721 wcscpy( 722 _Out_writes_z_(_String_length_(_Source) + 1) wchar_t *_Dest, 723 _In_z_ const wchar_t *_Source); 724 725 _Check_return_ 726 _CRTIMP 727 size_t 728 __cdecl 729 wcscspn( 730 _In_z_ const wchar_t *_Str, 731 _In_z_ const wchar_t *_Control); 732 733 _CRTIMP 734 wchar_t* 735 __cdecl 736 wcsncat( 737 wchar_t *_Dest, 738 const wchar_t *_Source, 739 size_t _Count); 740 741 _Ret_range_(==,_String_length_(_Str)) 742 _CRTIMP 743 size_t 744 __cdecl 745 wcslen( 746 _In_z_ const wchar_t *_Str); 747 748 _When_(_MaxCount > _String_length_(_Src), 749 _Post_satisfies_(return == _String_length_(_Src))) 750 _When_(_MaxCount <= _String_length_(_Src), 751 _Post_satisfies_(return == _MaxCount)) 752 _CRTIMP 753 _CRT_INSECURE_DEPRECATE(wcsnlen_s) 754 size_t 755 __cdecl 756 wcsnlen( 757 _In_reads_or_z_(_MaxCount) const wchar_t *_Src, 758 _In_ size_t _MaxCount); 759 760 _Check_return_ 761 _CRTIMP 762 int 763 __cdecl 764 wcsncmp( 765 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1, 766 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, 767 _In_ size_t _MaxCount); 768 769 _CRTIMP 770 _CRT_INSECURE_DEPRECATE(wcsncpy_s) 771 wchar_t* 772 __cdecl 773 wcsncpy( 774 wchar_t *_Dest, 775 const wchar_t *_Source, 776 size_t _Count); 777 778 _Check_return_ 779 _CRTIMP 780 _CONST_RETURN 781 wchar_t* 782 __cdecl 783 wcspbrk( 784 _In_z_ const wchar_t *_Str, 785 _In_z_ const wchar_t *_Control); 786 787 #ifdef __cplusplus 788 extern "C++" 789 _Check_return_ 790 inline wchar_t* __cdecl wcspbrk(_In_z_ wchar_t *_Str, _In_z_ const wchar_t *_Control) 791 { 792 return const_cast<wchar_t*>(wcspbrk(static_cast<const wchar_t*>(_Str), _Control)); 793 } 794 #endif // __cplusplus 795 796 _Check_return_ 797 _CRTIMP 798 _CONST_RETURN 799 wchar_t* 800 __cdecl 801 wcsrchr( 802 _In_z_ const wchar_t *_Str, 803 _In_ wchar_t _Ch); 804 805 #ifdef __cplusplus 806 extern "C++" 807 _Check_return_ 808 inline wchar_t* __CRTDECL wcsrchr(_In_z_ wchar_t *_String, _In_ wchar_t _C) 809 { 810 return const_cast<wchar_t*>(wcsrchr(static_cast<const wchar_t*>(_String), _C)); 811 } 812 #endif // __cplusplus 813 814 _Check_return_ 815 _CRTIMP 816 size_t 817 __cdecl 818 wcsspn( 819 _In_z_ const wchar_t *_Str, 820 _In_z_ const wchar_t *_Control); 821 822 _CRT_DISABLE_GCC_WARNINGS 823 _When_(return != 0, 824 _Ret_range_(_Str, _Str + _String_length_(_Str) - 1)) 825 _CRTIMP 826 _CONST_RETURN 827 wchar_t* 828 __cdecl 829 wcsstr( 830 _In_z_ const wchar_t *_Str, 831 _In_z_ const wchar_t *_SubStr); 832 _CRT_RESTORE_GCC_WARNINGS 833 834 #ifdef __cplusplus 835 extern "C++" 836 _Check_return_ _Ret_maybenull_ 837 _When_(return != NULL, _Ret_range_(_String, _String + _String_length_(_String) - 1)) 838 inline wchar_t* __CRTDECL wcsstr(_In_z_ wchar_t *_String, _In_z_ const wchar_t *_SubStr) 839 { 840 return const_cast<wchar_t*>(wcsstr(static_cast<const wchar_t*>(_String), _SubStr)); 841 } 842 #endif // __cplusplus 843 844 _Check_return_ 845 _CRTIMP 846 _CRT_INSECURE_DEPRECATE_CORE(wcstok_s) 847 wchar_t* 848 __cdecl 849 wcstok( 850 _Inout_opt_z_ wchar_t *_Str, 851 _In_z_ const wchar_t *_Delim); 852 853 _Check_return_ 854 _CRTIMP 855 _CRT_INSECURE_DEPRECATE(_wcserror_s) 856 wchar_t* 857 __cdecl 858 _wcserror( 859 _In_ int _ErrNum); 860 861 _Check_return_ 862 _CRTIMP 863 _CRT_INSECURE_DEPRECATE(__wcserror_s) 864 wchar_t* 865 __cdecl 866 __wcserror( 867 _In_opt_z_ const wchar_t *_Str); 868 869 _Check_return_ 870 _CRTIMP 871 int 872 __cdecl 873 _wcsicmp( 874 _In_z_ const wchar_t *_Str1, 875 _In_z_ const wchar_t *_Str2); 876 877 _Check_return_ 878 _CRTIMP 879 int 880 __cdecl 881 _wcsicmp_l( 882 _In_z_ const wchar_t *_Str1, 883 _In_z_ const wchar_t *_Str2, 884 _In_opt_ _locale_t _Locale); 885 886 _Check_return_ 887 _CRTIMP 888 int 889 __cdecl 890 _wcsnicmp( 891 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1, 892 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, 893 _In_ size_t _MaxCount); 894 895 _Check_return_ 896 _CRTIMP 897 int 898 __cdecl 899 _wcsnicmp_l( 900 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1, 901 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, 902 _In_ size_t _MaxCount, 903 _In_opt_ _locale_t _Locale); 904 905 _CRTIMP 906 _CRT_INSECURE_DEPRECATE_CORE(_wcsnset_s) 907 wchar_t* 908 __cdecl 909 _wcsnset( 910 wchar_t *_Str, 911 wchar_t _Val, 912 size_t _MaxCount); 913 914 _CRTIMP 915 wchar_t* 916 __cdecl 917 _wcsrev( 918 _Inout_z_ wchar_t *_Str); 919 920 _CRTIMP 921 _CRT_INSECURE_DEPRECATE_CORE(_wcsset_s) 922 wchar_t* 923 __cdecl 924 _wcsset( 925 wchar_t *_Str, 926 wchar_t _Val); 927 928 _CRTIMP 929 wchar_t* 930 __cdecl 931 _wcslwr( 932 _Inout_z_ wchar_t *_String); 933 934 _CRTIMP 935 wchar_t* 936 _wcslwr_l( 937 wchar_t *_String, 938 _locale_t _Locale); 939 940 _CRTIMP 941 wchar_t* 942 __cdecl 943 _wcsupr( 944 _Inout_z_ wchar_t *_String); 945 946 _CRTIMP 947 wchar_t* 948 _wcsupr_l( 949 wchar_t *_String, 950 _locale_t _Locale); 951 952 _Check_return_opt_ 953 _CRTIMP 954 size_t 955 __cdecl 956 wcsxfrm( 957 _Out_writes_opt_(_MaxCount) _Post_maybez_ wchar_t *_Dst, 958 _In_z_ const wchar_t *_Src, 959 _In_ size_t _MaxCount); 960 961 _Check_return_opt_ 962 _CRTIMP 963 size_t 964 __cdecl 965 _wcsxfrm_l( 966 _Out_writes_opt_(_MaxCount) _Post_maybez_ wchar_t *_Dst, 967 _In_z_ const wchar_t *_Src, 968 _In_ size_t _MaxCount, 969 _In_opt_ _locale_t _Locale); 970 971 _Check_return_ 972 _CRTIMP 973 int 974 __cdecl 975 wcscoll( 976 _In_z_ const wchar_t *_Str1, 977 _In_z_ const wchar_t *_Str2); 978 979 _Check_return_ 980 _CRTIMP 981 int 982 __cdecl 983 _wcscoll_l( 984 _In_z_ const wchar_t *_Str1, 985 _In_z_ const wchar_t *_Str2, 986 _In_opt_ _locale_t _Locale); 987 988 _Check_return_ 989 _CRTIMP 990 int 991 __cdecl 992 _wcsicoll( 993 _In_z_ const wchar_t *_Str1, 994 _In_z_ const wchar_t *_Str2); 995 996 _Check_return_ 997 _CRTIMP 998 int 999 __cdecl 1000 _wcsicoll_l( 1001 _In_z_ const wchar_t *_Str1, 1002 _In_z_ const wchar_t *_Str2, 1003 _In_opt_ _locale_t _Locale); 1004 1005 _Check_return_ 1006 _CRTIMP 1007 int 1008 __cdecl 1009 _wcsncoll( 1010 _In_z_ const wchar_t *_Str1, 1011 _In_z_ const wchar_t *_Str2, 1012 _In_ size_t _MaxCount); 1013 1014 _Check_return_ 1015 _CRTIMP 1016 int 1017 __cdecl 1018 _wcsncoll_l( 1019 _In_z_ const wchar_t *_Str1, 1020 _In_z_ const wchar_t *_Str2, 1021 _In_ size_t _MaxCount, 1022 _In_opt_ _locale_t _Locale); 1023 1024 _Check_return_ 1025 _CRTIMP 1026 int 1027 __cdecl 1028 _wcsnicoll( 1029 _In_z_ const wchar_t *_Str1, 1030 _In_z_ const wchar_t *_Str2, 1031 _In_ size_t _MaxCount); 1032 1033 _Check_return_ 1034 _CRTIMP 1035 int 1036 __cdecl 1037 _wcsnicoll_l( 1038 _In_z_ const wchar_t *_Str1, 1039 _In_z_ const wchar_t *_Str2, 1040 _In_ size_t _MaxCount, 1041 _In_opt_ _locale_t _Locale); 1042 1043 #if __STDC_WANT_SECURE_LIB__ 1044 1045 _CRTIMP 1046 errno_t 1047 __cdecl 1048 wcscat_s( 1049 wchar_t *Dest, 1050 size_t SizeInWords, 1051 const wchar_t *_Source); 1052 1053 _Check_return_wat_ 1054 _CRTIMP 1055 errno_t 1056 __cdecl 1057 wcscpy_s( 1058 _Out_writes_z_(SizeInWords) wchar_t *Dest, 1059 _In_ size_t SizeInWords, 1060 _In_z_ const wchar_t *_Source); 1061 1062 _CRTIMP 1063 errno_t 1064 __cdecl 1065 wcsnlen_s( 1066 wchar_t **_Src, 1067 size_t _MaxCount); 1068 1069 _Check_return_wat_ 1070 _CRTIMP 1071 errno_t 1072 __cdecl 1073 wcsncpy_s( 1074 _Out_writes_z_(_DstSizeInChars) wchar_t *_Dst, 1075 _In_ size_t _DstSizeInChars, 1076 _In_z_ const wchar_t *_Src, 1077 _In_ size_t _MaxCount); 1078 1079 _Check_return_wat_ 1080 _CRTIMP 1081 errno_t 1082 __cdecl 1083 _wcserror_s( 1084 _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buf, 1085 _In_ size_t _SizeInWords, 1086 _In_ int _ErrNum); 1087 1088 _Check_return_wat_ 1089 _CRTIMP 1090 errno_t 1091 __cdecl 1092 __wcserror_s( 1093 _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buffer, 1094 _In_ size_t _SizeInWords, 1095 _In_z_ const wchar_t *_ErrMsg); 1096 1097 _Check_return_wat_ 1098 _CRTIMP 1099 errno_t 1100 __cdecl 1101 _wcsnset_s( 1102 _Inout_updates_z_(_DstSizeInWords) wchar_t *_Dst, 1103 _In_ size_t _DstSizeInWords, 1104 _In_ wchar_t _Val, 1105 _In_ size_t _MaxCount); 1106 1107 _Check_return_wat_ 1108 _CRTIMP 1109 errno_t 1110 __cdecl 1111 _wcsset_s( 1112 _Inout_updates_z_(_SizeInWords) wchar_t *_Str, 1113 _In_ size_t _SizeInWords, 1114 _In_ wchar_t _Val); 1115 1116 _Check_return_wat_ 1117 _CRTIMP 1118 errno_t 1119 __cdecl 1120 _wcslwr_s( 1121 _Inout_updates_z_(_SizeInWords) wchar_t *_Str, 1122 _In_ size_t _SizeInWords); 1123 1124 _Check_return_wat_ 1125 _CRTIMP 1126 errno_t 1127 __cdecl 1128 _wcslwr_s_l( 1129 _Inout_updates_z_(_SizeInWords) wchar_t *_Str, 1130 _In_ size_t _SizeInWords, 1131 _In_opt_ _locale_t _Locale); 1132 1133 _Check_return_wat_ 1134 _CRTIMP 1135 errno_t 1136 __cdecl 1137 _wcsupr_s( 1138 _Inout_updates_z_(_Size) wchar_t *_Str, 1139 _In_ size_t _Size); 1140 1141 _Check_return_wat_ 1142 _CRTIMP 1143 errno_t 1144 __cdecl 1145 _wcsupr_s_l( 1146 _Inout_updates_z_(_Size) wchar_t *_Str, 1147 _In_ size_t _Size, 1148 _In_opt_ _locale_t _Locale); 1149 1150 #endif /* __STDC_WANT_SECURE_LIB__ */ 1151 1152 #ifndef NO_OLDNAMES 1153 1154 _Check_return_ 1155 _CRTIMP 1156 _CRT_NONSTDC_DEPRECATE(_wcsdup) 1157 wchar_t* 1158 __cdecl 1159 wcsdup( 1160 _In_z_ const wchar_t *_Str); 1161 1162 #define wcswcs wcsstr 1163 1164 _Check_return_ 1165 _CRTIMP 1166 _CRT_NONSTDC_DEPRECATE(_wcsicmp) 1167 int 1168 __cdecl 1169 wcsicmp( 1170 _In_z_ const wchar_t *_Str1, 1171 _In_z_ const wchar_t *_Str2); 1172 1173 _Check_return_ 1174 _CRTIMP 1175 _CRT_NONSTDC_DEPRECATE(_wcsnicmp) 1176 int 1177 __cdecl 1178 wcsnicmp( 1179 _In_reads_or_z_(_MaxCount) const wchar_t *_Str1, 1180 _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, 1181 _In_ size_t _MaxCount); 1182 1183 _CRTIMP 1184 _CRT_NONSTDC_DEPRECATE(_wcsnset) 1185 wchar_t* 1186 __cdecl 1187 wcsnset( 1188 _Inout_updates_z_(_MaxCount) wchar_t *_Str, 1189 _In_ wchar_t _Val, 1190 _In_ size_t _MaxCount); 1191 1192 _CRTIMP 1193 _CRT_NONSTDC_DEPRECATE(_wcsrev) 1194 wchar_t* 1195 __cdecl 1196 wcsrev( 1197 _Inout_z_ wchar_t *_Str); 1198 1199 _CRTIMP 1200 _CRT_NONSTDC_DEPRECATE(_wcsset) 1201 wchar_t* 1202 __cdecl 1203 wcsset( 1204 _Inout_z_ wchar_t *_Str, 1205 wchar_t _Val); 1206 1207 _CRTIMP 1208 _CRT_NONSTDC_DEPRECATE(_wcslwr) 1209 wchar_t* 1210 __cdecl 1211 wcslwr( 1212 _Inout_z_ wchar_t *_Str); 1213 1214 _CRTIMP 1215 _CRT_NONSTDC_DEPRECATE(_wcsupr) 1216 wchar_t* 1217 __cdecl 1218 wcsupr( 1219 _Inout_z_ wchar_t *_Str); 1220 1221 _Check_return_ 1222 _CRTIMP 1223 _CRT_NONSTDC_DEPRECATE(_wcsicoll) 1224 int 1225 __cdecl 1226 wcsicoll( 1227 _In_z_ const wchar_t *_Str1, 1228 _In_z_ const wchar_t *_Str2); 1229 1230 #endif /* NO_OLDNAMES */ 1231 1232 #endif /* !_WSTRING_DEFINED */ 1233 1234 #ifdef __cplusplus 1235 } 1236 #endif 1237 1238 #include <sec_api/string_s.h> 1239 #endif 1240