Function voca_rs::chop::removeprefix
source · Expand description
Extracts the prefix
from subject
.
Arguments
subject
- The string to extract from.prefix
- The string to extract if starts from it.
Example
use voca_rs::*;
chop::removeprefix("Once upon a time", "Once");
// => " upon a time"
chop::removeprefix("O̱̣̊ñç̉é ụ̈̇pǒ̵̱n ą̆ tímę", "O̱̣̊ñç̉é");
// => " ụ̈̇pǒ̵̱n ą̆ tímę"
use voca_rs::Voca;
"Once upon a time"._removeprefix("Once");
// => " upon a time"