pub fn strtr_array<'a>(s: &'a [u8], pairs: &[(&[u8], &[u8])]) -> Cow<'a, [u8]>Expand description
PHP strtr($string, $replace_pairs): at each position replaces the
longest key that matches, then continues after it; replaced text is never
rescanned. Empty keys are ignored (PHP warns). pairs is the array in
order, keys as PHP strings (integer keys as their decimal form); when a
key repeats, the last pair wins, as in a PHP array.