MCPcopy Index your code
hub / github.com/carllerche/assert-struct / like

Method like

assert-struct/src/lib.rs:1014–1018  ·  view source on GitHub ↗
(&self, pattern: &&str)

Source from the content-addressed store, hash-verified

1012 /// Implementation of Like for String with &str patterns (interpreted as regex)
1013 impl Like<&str> for String {
1014 fn like(&self, pattern: &&str) -> bool {
1015 regex::Regex::new(pattern)
1016 .map(|re| re.is_match(self))
1017 .unwrap_or(false)
1018 }
1019 }
1020
1021 /// Implementation of Like for String with String patterns (interpreted as regex)

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.80

Tested by

no test coverage detected