MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / Match

Function Match

steps/cpplint.py:1044–1051  ·  view source on GitHub ↗

Matches the string with the pattern, caching the compiled regexp.

(pattern, s)

Source from the content-addressed store, hash-verified

1042
1043
1044def Match(pattern, s):
1045 """Matches the string with the pattern, caching the compiled regexp."""
1046 # The regexp compilation caching is inlined in both Match and Search for
1047 # performance reasons; factoring it out into a separate function turns out
1048 # to be noticeably expensive.
1049 if pattern not in _regexp_compile_cache:
1050 _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
1051 return _regexp_compile_cache[pattern].match(s)
1052
1053
1054def ReplaceAll(pattern, rep, s):

Callers 15

IsInAlphabeticalOrderMethod · 0.85
CheckMethod · 0.85
CleanseRawStringsFunction · 0.85
_CollapseStringsMethod · 0.85
CloseExpressionFunction · 0.85
GetIndentLevelFunction · 0.85
CheckForHeaderGuardFunction · 0.85
CheckEndMethod · 0.85
CheckEndMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected