Skip to main content

get_idx_before_strict

Function get_idx_before_strict 

Source
pub fn get_idx_before_strict<'a>(text: &'a str, begin: &str) -> Option<usize>
Expand description

Alias for the str find method.

use string_tools::get_idx_before_strict;
 
assert_eq!(get_idx_before_strict("azertyuiopqsdfghjklmwxcvbn", "sdf"), Some(11));
assert_eq!(get_idx_before_strict("azertyuiopqsdfghjklmwxcvbn", "123"), None);