Function apply_redactions
Source pub fn apply_redactions(text: &str, spans: &[Span]) -> String
Expand description
Replace every span with ****, multibyte-safe.
Overlapping spans are merged before splicing. Spans must come from
scan on the same text (regex byte offsets are guaranteed char
boundaries).
§Panics
Panics if a span is out of bounds or not on a UTF-8 char boundary of
text.