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

Function Match

util/cpplint.py:646–653  ·  view source on GitHub ↗

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

(pattern, s)

Source from the content-addressed store, hash-verified

644
645
646def Match(pattern, s):
647 """Matches the string with the pattern, caching the compiled regexp."""
648 # The regexp compilation caching is inlined in both Match and Search for
649 # performance reasons; factoring it out into a separate function turns out
650 # to be noticeably expensive.
651 if pattern not in _regexp_compile_cache:
652 _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
653 return _regexp_compile_cache[pattern].match(s)
654
655
656def 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