MCPcopy Create free account
hub / github.com/apache/kvrocks / StringMatch

Function StringMatch

src/common/string_util.cc:259–262  ·  view source on GitHub ↗

Given a glob [pattern] and a string [string], return true iff the string matches the glob. If [ignore_case] is true, the match is case-insensitive.

Source from the content-addressed store, hash-verified

257// Given a glob [pattern] and a string [string], return true iff the string matches the glob.
258// If [ignore_case] is true, the match is case-insensitive.
259bool StringMatch(std::string_view glob, std::string_view str, bool ignore_case) {
260 bool skip_longer_matches = false;
261 return StringMatchImpl(glob, str, ignore_case, &skip_longer_matches);
262}
263
264// Split a glob pattern into a literal prefix and a suffix containing wildcards.
265// For example, if the user calls [KEYS bla*bla], this function will return {"bla", "*bla"}.

Callers 7

KeysMethod · 0.85
ScanMethod · 0.85
PublishMessageMethod · 0.85
GetChannelsByPatternMethod · 0.85
GetSChannelsByPatternMethod · 0.85
GetMethod · 0.85
TESTFunction · 0.85

Calls 1

StringMatchImplFunction · 0.85

Tested by 1

TESTFunction · 0.68