Function crowbook_text_processing::escape::escape_nb_spaces_tex [] [src]

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

Escape non breaking spaces for LaTeX, replacing them with ~.

Example

use crowbook_text_processing::escape::escape_nb_spaces_tex;
let s = escape_nb_spaces_tex("Des espaces insécables ? Ça alors !");
assert_eq!(&s, "Des espaces insécables~? Ça alors~!");