Skip to content

Commit

Permalink
Update first sentence of "parsing a string" in string.md
Browse files Browse the repository at this point in the history
Currently, the version of this sentence that's online makes no sense at all. The version in the source does literally make sense, but it is very difficult to read. This version is less terse, but I think it's much clearer.
  • Loading branch information
eje211 authored Jan 21, 2024
1 parent 0214ba6 commit 5b307a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/conversion/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ fn main() {

## Parsing a String

One of the more common types to convert a string into is a number. The idiomatic
approach to this is to use the [`parse`] function and either to arrange for
type inference or to specify the type to parse using the 'turbofish' syntax.
Both alternatives are shown in the following example.
It's useful to convert strings into many types, but one of the more common string
operations is to convert them from string to number. The idiomatic approach to
this is to use the [`parse`] function and either to arrange for type inference or
to specify the type to parse using the 'turbofish' syntax. Both alternatives are
shown in the following example.

This will convert the string into the type specified as long as the [`FromStr`]
trait is implemented for that type. This is implemented for numerous types
Expand Down

0 comments on commit 5b307a5

Please sign in to comment.