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

Method repeat

wasm-pdk/example/src/lib.rs:67–72  ·  view source on GitHub ↗
(&self, n: i64)

Source from the content-addressed store, hash-verified

65 }
66
67 pub fn repeat(&self, n: i64) -> Result<String> {
68 if n < 0 {
69 return Err(Error::Value("repeat count must be non-negative".to_string()));
70 }
71 Ok(self.parts.join("-").repeat(n as usize))
72 }
73
74 pub fn total_len(&self) -> i64 {
75 self.parts.iter().map(|p| p.len() as i64).sum()

Callers 8

renderMethod · 0.45
mul_valsMethod · 0.45
centerFunction · 0.45
zfillFunction · 0.45
make_strFunction · 0.45
script.pyFile · 0.45
createEditorFunction · 0.45
insertNormalizedFunction · 0.45

Calls 1

ValueEnum · 0.50

Tested by 1

make_strFunction · 0.36