Skip to content

Conversation

Rageking8
Copy link
Contributor

  • Convert "Class" in title to lowercase and rename "Parameters" heading with "Template parameters"
  • Fix wrong return type in literals syntax and add missing comma in compare
  • Add some backticks, fix some typos, and clean up redundant relative links

Copy link
Contributor

@Rageking8 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

Copy link
Contributor

Learn Build status updates of commit a81ce6c:

✅ Validation status: passed

File Status Preview URL Details
docs/standard-library/basic-string-class.md ✅Succeeded

For more details, please refer to the build report.

@v-dirichards
Copy link
Contributor

@TylerMSFT

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator bot added the aq-pr-triaged Tracking label for the PR review team label Aug 21, 2025
@v-dirichards v-dirichards self-assigned this Sep 24, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR cleans up the documentation for the basic_string class reference by making various editorial improvements and corrections. The changes focus on improving consistency, fixing typos, and ensuring proper formatting.

Key changes:

  • Title case corrections and template parameter section renaming
  • Fixed incorrect return types and missing punctuation in code documentation
  • Formatting improvements with backticks and typo corrections

// The second member function assigning a specific
// number of the of characters a C-string to a string
// number of the characters of a C-string to a string
Copy link
Preview

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a grammatical error in the comment. "number of the characters" should be "number of characters" - remove the extra "the".

Suggested change
// number of the characters of a C-string to a string
// number of characters of a C-string to a string

Copilot uses AI. Check for mistakes.

`operator[]` is faster than the member function [`at`](#at) for providing read and write access to the elements of a string.

`operator[]` doesn't check whether the index passed as a parameter is valid, but the member function `at` does and so should be used in the validity isn't certain. An invalid index (an index less that zero or greater than or equal to the size of the string) passed to the member function `at` throws an [`out_of_range` Class](../standard-library/out-of-range-class.md) exception. An invalid index passed to `operator[]` results in undefined behavior, but the index equal to the length of the string is a valid index for const strings and the operator returns the null character when passed this index.
`operator[]` doesn't check whether the index passed as a parameter is valid, but the member function `at` does and so should be used if the validity isn't certain. An invalid index (an index less than zero or greater than or equal to the size of the string) passed to the member function `at` throws an [`out_of_range` Class](out-of-range-class.md) exception. An invalid index passed to `operator[]` results in undefined behavior, but the index equal to the length of the string is a valid index for const strings and the operator returns the null character when passed this index.
Copy link
Preview

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a grammatical error. "less that zero" should be "less than zero".

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants