File tree 1 file changed +8
-5
lines changed
library/core/src/num/dec2flt
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 {
112
112
/// * '2.5E-10'
113
113
/// * '5.'
114
114
/// * '.5', or, equivalently, '0.5'
115
- /// * 'inf', '-inf', 'NaN'
115
+ /// * 'inf', '-inf', '+infinity', 'NaN'
116
+ ///
117
+ /// Note that alphabetical characters are not case-sensitive.
116
118
///
117
119
/// Leading and trailing whitespace represent an error.
118
120
///
119
121
/// # Grammar
120
122
///
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:
123
125
///
124
126
/// ```txt
125
- /// Float ::= Sign? ( 'inf' | 'NaN ' | Number )
127
+ /// Float ::= Sign? ( 'inf' | 'infinity' | 'nan ' | Number )
126
128
/// Number ::= ( Digit+ |
129
+ /// '.' Digit* |
127
130
/// Digit+ '.' Digit* |
128
131
/// Digit* '.' Digit+ ) Exp?
129
- /// Exp ::= [eE] Sign? Digit+
132
+ /// Exp ::= 'e' Sign? Digit+
130
133
/// Sign ::= [+-]
131
134
/// Digit ::= [0-9]
132
135
/// ```
You can’t perform that action at this time.
0 commit comments