MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / parse_size_prefix

Function parse_size_prefix

packages/server/src/android.rs:2187–2195  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

2185}
2186
2187fn parse_size_prefix(value: &str) -> Option<(f64, f64)> {
2188 let mut parts = value.split_whitespace();
2189 let width = parts.next()?.trim_end_matches(',').parse::<f64>().ok()?;
2190 if parts.next()? != "x" {
2191 return None;
2192 }
2193 let height = parts.next()?.trim_end_matches(',').parse::<f64>().ok()?;
2194 Some((width, height))
2195}
2196
2197fn parse_logical_frame_size(line: &str) -> Option<(f64, f64)> {
2198 let (_, value) = line.split_once("logicalFrame=Rect(")?;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected