Making f64::from_str case insensitive #48881
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Consider making
f64::from_str(src: &str) -> Result<f64, ParseFloatError>
case insensitive due to the following reasons:"INF"
or"Inf"
f64::INFINITY
is all upper casef64::NAN
is all upper caseis_nan
is all lower casee
in"12e3"
is case insensitive, so it seems to be inconsequent"NaN"
is camel case, but"inf"
is lower case, which seems to be a little bit inconsistentto_ascii_lowercase
is slow and will not be of help as"NaN"
is mixed caseto_ascii_uppercase
is slow and will not be of help as"NaN"
is mixed caseto_standard_form(src: &str, dest: &mut str) -> Result<(), ParseFloatError>
is not possible asstr
cannot be mutableSo far, only
"inf"
and"NaN"
are allowed.Cons:
The text was updated successfully, but these errors were encountered: