MCPcopy Index your code
hub / github.com/clearloop/leetcode-cli / digit

Method digit

src/helper.rs:17–23  ·  view source on GitHub ↗
(self, d: i32)

Source from the content-addressed store, hash-verified

15
16 impl Digit<i32> for i32 {
17 fn digit(self, d: i32) -> String {
18 let mut s = self.to_string();
19 let space = " ".repeat((d as usize) - s.len());
20 s.push_str(&space);
21
22 s
23 }
24 }
25
26 impl Digit<i32> for String {

Callers 2

runMethod · 0.80
runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected