@@ -1249,7 +1249,7 @@ def foldr {α : Type u} (f : Char → α → α) (init : α) (s : Slice) : α :=
12491249Checks whether the slice can be interpreted as the decimal representation of a natural number.
12501250
12511251A slice can be interpreted as a decimal natural number if it is not empty and all the characters in
1252- it are digits. Underscores (`_`) are allowed as digit separators for readability, but cannot appear
1252+ it are digits. Underscores ({lit} `_`) are allowed as digit separators for readability, but cannot appear
12531253at the start, at the end, or consecutively.
12541254
12551255Use {name (scope := "Init.Data.String.Slice")}`toNat?` or
@@ -1293,7 +1293,7 @@ Interprets a slice as the decimal representation of a natural number, returning
12931293{name}`none` if the slice does not contain a decimal natural number.
12941294
12951295A slice can be interpreted as a decimal natural number if it is not empty and all the characters in
1296- it are digits. Underscores (`_`) are allowed as digit separators and are ignored during parsing.
1296+ it are digits. Underscores ({lit} `_`) are allowed as digit separators and are ignored during parsing.
12971297
12981298Use {name}`isNat` to check whether {name}`toNat?` would return {name}`some`.
12991299{name (scope := "Init.Data.String.Slice")}`toNat!` is an alternative that panics instead of
@@ -1322,7 +1322,7 @@ Interprets a slice as the decimal representation of a natural number, returning
13221322slice does not contain a decimal natural number.
13231323
13241324A slice can be interpreted as a decimal natural number if it is not empty and all the characters in
1325- it are digits. Underscores (`_`) are allowed as digit separators and are ignored during parsing.
1325+ it are digits. Underscores ({lit} `_`) are allowed as digit separators and are ignored during parsing.
13261326
13271327Use {name}`isNat` to check whether {name}`toNat!` would return a value. {name}`toNat?` is a safer
13281328alternative that returns {name}`none` instead of panicking when the string is not a natural number.
0 commit comments