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

Function join_all

wasm-pdk/example/src/lib.rs:25–32  ·  view source on GitHub ↗
(sep: String, parts: Args)

Source from the content-addressed store, hash-verified

23/// Variadic join over `parts`, separated by `sep`. Showcases the trailing `Args` param.
24#[plugin_fn]
25fn join_all(sep: String, parts: Args) -> Result<String> {
26 let mut out = String::new();
27 for (i, h) in parts.0.iter().enumerate() {
28 if i > 0 { out.push_str(&sep); }
29 out.push_str(&String::from_handle(h.raw())?);
30 }
31 Ok(out)
32}
33
34/// Accumulates slug parts across calls; exercises mutable state and Option/Result returns.
35#[plugin_class]

Callers

nothing calls this directly

Calls 2

iterMethod · 0.45
rawMethod · 0.45

Tested by

no test coverage detected