MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / Match

Function Match

src/tests/coding/cpplint.py:1029–1036  ·  view source on GitHub ↗

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

(pattern, s)

Source from the content-addressed store, hash-verified

1027
1028
1029def Match(pattern, s):
1030 """Matches the string with the pattern, caching the compiled regexp."""
1031 # The regexp compilation caching is inlined in both Match and Search for
1032 # performance reasons; factoring it out into a separate function turns out
1033 # to be noticeably expensive.
1034 if pattern not in _regexp_compile_cache:
1035 _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
1036 return _regexp_compile_cache[pattern].match(s)
1037
1038
1039def ReplaceAll(pattern, rep, s):

Callers 15

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

Calls

no outgoing calls

Tested by

no test coverage detected