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

Function decimal_point_or_empty

crates/literal/src/float.rs:50–55  ·  view source on GitHub ↗
(precision: usize, alternate_form: bool)

Source from the content-addressed store, hash-verified

48}
49
50pub const fn decimal_point_or_empty(precision: usize, alternate_form: bool) -> &'static str {
51 match (precision, alternate_form) {
52 (0, true) => ".",
53 _ => "",
54 }
55}
56
57pub fn format_fixed(precision: usize, magnitude: f64, case: Case, alternate_form: bool) -> String {
58 match magnitude {

Callers 4

format_floatMethod · 0.85
format_fixedFunction · 0.85
format_exponentFunction · 0.85
format_generalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected