From 5b307a5a1076c00234c1d77ed3dcb117e07d6ede Mon Sep 17 00:00:00 2001 From: Emmanuel Eytan Date: Sun, 21 Jan 2024 18:28:37 -0500 Subject: [PATCH] Update first sentence of "parsing a string" in string.md 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. --- src/conversion/string.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/conversion/string.md b/src/conversion/string.md index 9a17a2ce68..d8ed4808ea 100644 --- a/src/conversion/string.md +++ b/src/conversion/string.md @@ -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