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

Function remove_trailing_zeros

crates/literal/src/float.rs:110–116  ·  view source on GitHub ↗
(s: String)

Source from the content-addressed store, hash-verified

108}
109
110fn remove_trailing_zeros(s: String) -> String {
111 let mut s = s;
112 while s.ends_with('0') {
113 s.pop();
114 }
115 s
116}
117
118fn remove_trailing_decimal_point(s: String) -> String {
119 let mut s = s;

Callers 1

Calls 2

ends_withMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected