MCPcopy Create free account
hub / github.com/chatmail/core / dehtml_manually

Function dehtml_manually

src/dehtml.rs:385–401  ·  view source on GitHub ↗
(buf: &str)

Source from the content-addressed store, hash-verified

383}
384
385pub fn dehtml_manually(buf: &str) -> String {
386 // Just strip out everything between "<" and ">"
387 let mut strbuilder = String::new();
388 let mut show_next_chars = true;
389 for c in buf.chars() {
390 match c {
391 '<' => show_next_chars = false,
392 '>' => show_next_chars = true,
393 _ => {
394 if show_next_chars {
395 strbuilder.push(c)
396 }
397 }
398 }
399 }
400 strbuilder
401}
402
403#[cfg(test)]
404mod tests {

Callers 1

dehtmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected