This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
library/core/src/num/dec2flt Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -112,21 +112,24 @@ macro_rules! from_str_float_impl {
112112 /// * '2.5E-10'
113113 /// * '5.'
114114 /// * '.5', or, equivalently, '0.5'
115- /// * 'inf', '-inf', 'NaN'
115+ /// * 'inf', '-inf', '+infinity', 'NaN'
116+ ///
117+ /// Note that alphabetical characters are not case-sensitive.
116118 ///
117119 /// Leading and trailing whitespace represent an error.
118120 ///
119121 /// # Grammar
120122 ///
121- /// All strings that adhere to the following [EBNF] grammar
122- /// will result in an [`Ok`] being returned:
123+ /// All strings that adhere to the following [EBNF] grammar when
124+ /// lowercased will result in an [`Ok`] being returned:
123125 ///
124126 /// ```txt
125- /// Float ::= Sign? ( 'inf' | 'NaN ' | Number )
127+ /// Float ::= Sign? ( 'inf' | 'infinity' | 'nan ' | Number )
126128 /// Number ::= ( Digit+ |
129+ /// '.' Digit* |
127130 /// Digit+ '.' Digit* |
128131 /// Digit* '.' Digit+ ) Exp?
129- /// Exp ::= [eE] Sign? Digit+
132+ /// Exp ::= 'e' Sign? Digit+
130133 /// Sign ::= [+-]
131134 /// Digit ::= [0-9]
132135 /// ```
You can’t perform that action at this time.
0 commit comments