Function voca_rs::manipulate::tr
source · Expand description
Translates characters or replaces substrings in subject
.
Arguments
subject
- The string to translate.from
- The string of characters to translate from.to
- The string of characters to translate to.
Example
use voca_rs::*;
manipulate::tr("hello", "el", "ip");
// => "hippo"
manipulate::tr("légèreté", "éè", "ee");
// => "legerete"
use voca_rs::Voca;
"hello"._tr("el", "ip");
// => "hippo"