MCPcopy Index your code
hub / github.com/RustPython/RustPython / parse_str

Function parse_str

crates/literal/src/float.rs:8–10  ·  view source on GitHub ↗
(literal: &str)

Source from the content-addressed store, hash-verified

6use num_traits::{Float, Zero};
7
8pub fn parse_str(literal: &str) -> Option<f64> {
9 parse_inner(literal.trim().as_bytes())
10}
11
12pub fn parse_bytes(literal: &[u8]) -> Option<f64> {
13 parse_inner(literal.trim_ascii())

Callers

nothing calls this directly

Calls 3

parse_innerFunction · 0.85
trimMethod · 0.80
as_bytesMethod · 0.45

Tested by

no test coverage detected