MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / number

Method number

native/watchos/src/models.rs:669–679  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

667 None
668 }
669 fn number(&mut self) -> Option<f64> {
670 let start = self.pos;
671 if self.peek() == Some(b'-') { self.bump(); }
672 while let Some(c) = self.peek() {
673 match c {
674 b'0'..=b'9' | b'.' | b'e' | b'E' | b'+' | b'-' => { self.bump(); }
675 _ => break,
676 }
677 }
678 std::str::from_utf8(&self.bytes[start..self.pos]).ok()?.parse().ok()
679 }
680}
681
682pub fn json_parse(s: &str) -> Option<JVal> {

Callers 1

valMethod · 0.80

Calls 2

peekMethod · 0.80
bumpMethod · 0.80

Tested by

no test coverage detected