Function crowbook_text_processing::clean::guillemets [] [src]

pub fn guillemets<'a, S: Into<Cow<'a, str>>>(input: S) -> Cow<'a, str>

Replaces << with « and >> with ».

This can be useful if you need those characters (e.g. for french texts) but don't have an easy access to them on your computer but, as the dashes function, it should be used with caution, as << and >> can also be used for other things (typically to mean "very inferior to" or "very superior to").

Example

use crowbook_text_processing::clean; let s = clean::guillemets("<< Foo >>"); assert_eq!(&s, "« Foo »"); ```