MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / prefix_lines

Function prefix_lines

src/path_tree.rs:71–80  ·  view source on GitHub ↗
(text: &str, prefix: &str)

Source from the content-addressed store, hash-verified

69}
70
71fn prefix_lines(text: &str, prefix: &str) -> String {
72 if prefix.is_empty() {
73 return text.to_string();
74 }
75
76 text.lines()
77 .map(|line| format!("{prefix}{line}"))
78 .collect::<Vec<_>>()
79 .join("\n")
80}
81
82fn has_directory_shape(node: &PathNode) -> bool {
83 node.children

Callers 1

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected