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

Method add

wasm-pdk/example/src/lib.rs:47–55  ·  view source on GitHub ↗
(&mut self, s: String)

Source from the content-addressed store, hash-verified

45 }
46
47 pub fn add(&mut self, s: String) {
48 let normalized: String = s.to_lowercase()
49 .chars()
50 .map(|c| if c.is_alphanumeric() { c } else { '-' })
51 .collect();
52 for part in normalized.split('-').filter(|p| !p.is_empty()) {
53 self.parts.push(part.to_string());
54 }
55 }
56
57 pub fn build(&self) -> String {
58 self.parts.join("-")

Callers 7

allocFunction · 0.80
tree.jsFile · 0.80
script.pyFile · 0.80
runFunction · 0.80
fetchWithLockfileFunction · 0.80
bfsPrefetchFunction · 0.80
r#matchFunction · 0.80

Calls 3

collectMethod · 0.80
pushMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected