Function voca_rs::index::last_index_of
source · Expand description
Returns the last occurrence index of search
in subject
or -1 if not found. Case sensitive.
Arguments
subject
- The string where to search.search
- The string to search.from_index
- The index to start searching
Example
use voca_rs::*;
index::last_index_of("morning", "n", 0);
// => 5
index::last_index_of("evening", "o", 0);
// => -1
use voca_rs::Voca;
"morning"._last_index_of("n", 0);
// => 5