MCPcopy Create free account
hub / github.com/Ainevsia/Leetcode-Rust / is_number

Method is_number

65. Valid Number/src/main.rs:95–97  ·  view source on GitHub ↗
(s: String)

Source from the content-addressed store, hash-verified

93 }
94
95 pub fn is_number(s: String) -> bool { // sneaky way but you **should** think of
96 s.trim().parse::<f64>().is_ok()
97 }
98}
99
100#[derive(PartialEq, Debug)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected