MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / sign_char

Function sign_char

compiler/src/modules/vm/handlers/format.rs:330–335  ·  view source on GitHub ↗
(neg: bool, sign_flag: u8)

Source from the content-addressed store, hash-verified

328}
329
330fn sign_char(neg: bool, sign_flag: u8) -> Option<char> {
331 if neg { Some('-') }
332 else if sign_flag == b'+' { Some('+') }
333 else if sign_flag == b' ' { Some(' ') }
334 else { None }
335}
336
337fn pad_numeric(s: &Spec, body: &str) -> String {
338 let (neg, mag) = if let Some(rest) = body.strip_prefix('-') { (true, rest) } else { (false, body) };

Callers 4

format_percentFunction · 0.85
format_intFunction · 0.85
format_floatFunction · 0.85
pad_numericFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected