From 529412553130e09f8681d0c46bae1473d6e30230 Mon Sep 17 00:00:00 2001 From: Alex Guteniev Date: Tue, 11 Jul 2023 23:05:21 +0300 Subject: [PATCH 1/2] Mark `_Copy_s` microsoft-specific --- docs/standard-library/basic-string-class.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/standard-library/basic-string-class.md b/docs/standard-library/basic-string-class.md index d1bb3eb2dfe..00bdf5046a0 100644 --- a/docs/standard-library/basic-string-class.md +++ b/docs/standard-library/basic-string-class.md @@ -1,7 +1,7 @@ --- title: "basic_string Class" description: "API reference for the Standard C++ string class, `basic_string`." -ms.date: 06/10/2022 +ms.date: 07/11/2023 f1_keywords: ["xstring/std::basic_string", "xstring/std::basic_string::allocator_type", "xstring/std::basic_string::const_iterator", "xstring/std::basic_string::const_pointer", "xstring/std::basic_string::const_reference", "xstring/std::basic_string::const_reverse_iterator", "xstring/std::basic_string::difference_type", "xstring/std::basic_string::iterator", "xstring/std::basic_string::npos", "xstring/std::basic_string::pointer", "xstring/std::basic_string::reference", "xstring/std::basic_string::reverse_iterator", "xstring/std::basic_string::size_type", "xstring/std::basic_string::traits_type", "xstring/std::basic_string::value_type", "xstring/std::basic_string::append", "xstring/std::basic_string::assign", "xstring/std::basic_string::at", "xstring/std::basic_string::back", "xstring/std::basic_string::begin", "xstring/std::basic_string::c_str", "xstring/std::basic_string::capacity", "xstring/std::basic_string::cbegin", "xstring/std::basic_string::cend", "xstring/std::basic_string::clear", "xstring/std::basic_string::compare", "xstring/std::basic_string::copy", "xstring/std::basic_string::crbegin", "xstring/std::basic_string::crend", "xstring/std::basic_string::_Copy_s", "xstring/std::basic_string::data", "xstring/std::basic_string::empty", "xstring/std::basic_string::end", "xstring/std::basic_string::erase", "xstring/std::basic_string::find", "xstring/std::basic_string::find_first_not_of", "xstring/std::basic_string::find_first_of", "xstring/std::basic_string::find_last_not_of", "xstring/std::basic_string::find_last_of", "xstring/std::basic_string::front", "xstring/std::basic_string::get_allocator", "xstring/std::basic_string::insert", "xstring/std::basic_string::length", "xstring/std::basic_string::max_size", "xstring/std::basic_string::pop_back", "xstring/std::basic_string::push_back", "xstring/std::basic_string::rbegin", "xstring/std::basic_string::rend", "xstring/std::basic_string::replace", "xstring/std::basic_string::reserve", "xstring/std::basic_string::resize", "xstring/std::basic_string::rfind", "xstring/std::basic_string::shrink_to_fit", "xstring/std::basic_string::size", "xstring/std::basic_string::substr", "xstring/std::basic_string::ends_with", "xstring/std::basic_string::starts_with", "xstring/std::basic_string::swap", 'xstring/std::literals::string_literals', 'std::literals::string_literals', 'string_literals', 'xstring/std::literals::string_literals::operator "s', 'std::literals::string_literals::operator s'] helpviewer_keywords: ["std::basic_string [C++]", "std::basic_string [C++], allocator_type", "std::basic_string [C++], const_iterator", "std::basic_string [C++], const_pointer", "std::basic_string [C++], const_reference", "std::basic_string [C++], const_reverse_iterator", "std::basic_string [C++], difference_type", "std::basic_string [C++], iterator", "std::basic_string [C++], npos", "std::basic_string [C++], pointer", "std::basic_string [C++], reference", "std::basic_string [C++], reverse_iterator", "std::basic_string [C++], size_type", "std::basic_string [C++], traits_type", "std::basic_string [C++], value_type", "std::basic_string [C++], append", "std::basic_string [C++], assign", "std::basic_string [C++], at", "std::basic_string [C++], back", "std::basic_string [C++], begin", "std::basic_string [C++], c_str", "std::basic_string [C++], capacity", "std::basic_string [C++], cbegin", "std::basic_string [C++], cend", "std::basic_string [C++], clear", "std::basic_string [C++], compare", "std::basic_string [C++], copy", "std::basic_string [C++], crbegin", "std::basic_string [C++], crend", "std::basic_string [C++], _Copy_s", "std::basic_string [C++], data", "std::basic_string [C++], empty", "std::basic_string [C++], end", "std::basic_string [C++], erase", "std::basic_string [C++], find", "std::basic_string [C++], find_first_not_of", "std::basic_string [C++], find_first_of", "std::basic_string [C++], find_last_not_of", "std::basic_string [C++], find_last_of", "std::basic_string [C++], front", "std::basic_string [C++], get_allocator", "std::basic_string [C++], insert", "std::basic_string [C++], length", "std::basic_string [C++], max_size", "std::basic_string [C++], pop_back", "std::basic_string [C++], push_back", "std::basic_string [C++], rbegin", "std::basic_string [C++], rend", "std::basic_string [C++], replace", "std::basic_string [C++], reserve", "std::basic_string [C++], resize", "std::basic_string [C++], rfind", "std::basic_string [C++], shrink_to_fit", "std::basic_string [C++], size", "std::basic_string [C++], starts_with", "std::basic_string [C++], ends_with","std::basic_string [C++], substr", "std::basic_string [C++], swap"] ms.custom: devdivchpfy22 @@ -72,7 +72,7 @@ The type that represents the stored allocator object that encapsulates details a |[`copy`](#copy)|Copies at most a specified number of characters from an indexed position in a source string to a target character array. Deprecated. Use [`basic_string::_Copy_s`](#copy_s) instead.| |[`crbegin`](#crbegin)|Returns a const iterator that addresses the first element in a reversed string.| |[`crend`](#crend)|Returns a const iterator that addresses the location succeeding the last element in a reversed string.| -|[`_Copy_s`](#copy_s)|Copies at most a specified number of characters from an indexed position in a source string to a target character array.| +|[`_Copy_s`](#copy_s)|**Microsoft Specific**
Copies at most a specified number of characters from an indexed position in a source string to a target character array.
**END Microsoft Specific**| |[`data`](#data)|Converts the contents of a string into an array of characters.| |[`empty`](#empty)|Tests whether the string contains characters.| |[`end`](#end)|Returns an iterator that addresses the location succeeding the last element in a string.| @@ -1477,6 +1477,8 @@ A `const` reverse iterator that addresses the location succeeding the last eleme ## `basic_string::_Copy_s` +**Microsoft Specific** + Copies at most a specified number of characters from an indexed position in a source string to a target character array. ```cpp @@ -1556,6 +1558,8 @@ The number of copied characters in array2 is: 5 The copied characters array2 is: World ``` +**END Microsoft Specific** + ## `basic_string::data` Converts the contents of a string into a null-terminated array of characters. From c2d29c29f94f3c2f0416f351798fa77d5d168df8 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Tue, 11 Jul 2023 14:00:12 -0700 Subject: [PATCH 2/2] Update basic-string-class.md Use MS style and remove HTML codes --- docs/standard-library/basic-string-class.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/standard-library/basic-string-class.md b/docs/standard-library/basic-string-class.md index 00bdf5046a0..43c1e29f5c4 100644 --- a/docs/standard-library/basic-string-class.md +++ b/docs/standard-library/basic-string-class.md @@ -72,7 +72,7 @@ The type that represents the stored allocator object that encapsulates details a |[`copy`](#copy)|Copies at most a specified number of characters from an indexed position in a source string to a target character array. Deprecated. Use [`basic_string::_Copy_s`](#copy_s) instead.| |[`crbegin`](#crbegin)|Returns a const iterator that addresses the first element in a reversed string.| |[`crend`](#crend)|Returns a const iterator that addresses the location succeeding the last element in a reversed string.| -|[`_Copy_s`](#copy_s)|**Microsoft Specific**
Copies at most a specified number of characters from an indexed position in a source string to a target character array.
**END Microsoft Specific**| +|[`_Copy_s`](#copy_s)|**Microsoft Specific**: Copies at most a specified number of characters from an indexed position in a source string to a target character array.| |[`data`](#data)|Converts the contents of a string into an array of characters.| |[`empty`](#empty)|Tests whether the string contains characters.| |[`end`](#end)|Returns an iterator that addresses the location succeeding the last element in a string.| @@ -1477,8 +1477,6 @@ A `const` reverse iterator that addresses the location succeeding the last eleme ## `basic_string::_Copy_s` -**Microsoft Specific** - Copies at most a specified number of characters from an indexed position in a source string to a target character array. ```cpp @@ -1510,6 +1508,7 @@ The number of characters copied. ### Remarks A null character isn't appended to the end of the copy. +This function is Microsoft specific. ### Example @@ -1558,8 +1557,6 @@ The number of copied characters in array2 is: 5 The copied characters array2 is: World ``` -**END Microsoft Specific** - ## `basic_string::data` Converts the contents of a string into a null-terminated array of characters.