Function jay_lib::fns::fn_str::g_str_v

source ·
pub fn g_str_v<S: AsRef<str>>(s: S, start: S, end: S) -> Option<Vec<String>>
Expand description

Got middle substrings from string to Vec<String> Example:

 use jay_lib::fns::fn_str::g_str_v;
     let mut v1: Vec<String> = Vec::new();
     if let Some(v) = middle::g_str_v("Hello,world.Hello,world", "H", "ld") {
         v1 = v
     }
     for i in v1 {
         assert_eq!("ello,wor", i);
     }
     let mut v=Vec::new();
     v.push("ello,wor".to_string());
     v.push("ello,wor".to_string());
     assert_eq!(Some(v), middle::g_str_v("Hello,world.Hello,world", "H", "ld"));