Expand description
Returns everything before the given search
.
Arguments
subject
- The string to extract from.search
- The substring to look for.
Example
use voca_rs::*;
chop::before("This is my name", "my name");
// => "This is "
chop::before("S̃o̊m̋ȩ̈ gḷ̉y̌p̆ẖs a̋řẹ̆̇ hër̵ē̱", "gḷ̉y̌p̆ẖs");
// => "S̃o̊m̋ȩ̈ "
use voca_rs::Voca;
"This is my name"._before("my name");
// => "This is "