Skip to content

Commit d592d89

Browse files
authored
docs: minor typo fix in reverse-string approach (#904)
Fixing a minor typo and punctuation error in the "Using the standard library" approach to `reverse-string`.
1 parent eeed6ed commit d592d89

File tree

1 file changed

+2
-2
lines changed
  • exercises/practice/reverse-string/.approaches/using-the-standard-lib

1 file changed

+2
-2
lines changed

exercises/practice/reverse-string/.approaches/using-the-standard-lib/content.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ After including this header we can call the function `std::reverse` later in the
4545
## The type of the parameter
4646

4747
The function takes its argument "by value" (`std::string`).
48-
That means the parameter `str` gets constructed from the argument tht the caller passes to the function, and it gets destructed at the end of the function.
48+
That means the parameter `str` gets constructed from the argument that the caller passes to the function, and it gets destructed at the end of the function.
4949
Any modifications of the parameter will not be visible outside of the function and will not affect the argument of the caller.
5050
We do that because the function needs a "working copy" of the string, it will reverse and return that parameter without creating an additional instance of `std::string`.
5151

@@ -57,7 +57,7 @@ These two iterators define a half-open interval `[begin, end)`.
5757

5858
## Conclusion
5959

60-
This is a great approach, it is concise, easy to read, idiomatic, and very efficient.
60+
This is a great approach; it is concise, easy to read, idiomatic, and very efficient.
6161

6262

6363
[cppref-algorithm]: https://en.cppreference.com/w/cpp/header/algorithm

0 commit comments

Comments
 (0)