str_in_re

Function str_in_re 

Source
pub fn str_in_re(s: &SmtString, r: RegLan) -> bool
Expand description

Check whether a string is in a regular expression

ยงExample

use aws_smt_strings::smt_regular_expressions::*;

let any = re_allchar();
let all = re_all();
let sep = str_to_re(&":".into());
let aaa = str_to_re(&"aaa".into());
let t = re_concat_list([any, any, sep, aaa, sep, all, sep, aaa, sep, all]);

assert!(str_in_re(&"ij:aaa::aaa:cdef".into(), t));