MCPcopy Create free account
hub / github.com/SIPp/sipp / Match

Function Match

cpplint.py:409–416  ·  view source on GitHub ↗

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

(pattern, s)

Source from the content-addressed store, hash-verified

407 linenum in _error_suppressions.get(None, set()))
408
409def Match(pattern, s):
410 """Matches the string with the pattern, caching the compiled regexp."""
411 # The regexp compilation caching is inlined in both Match and Search for
412 # performance reasons; factoring it out into a separate function turns out
413 # to be noticeably expensive.
414 if not pattern in _regexp_compile_cache:
415 _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
416 return _regexp_compile_cache[pattern].match(s)
417
418
419def Search(pattern, s):

Callers 15

CheckMethod · 0.85
CheckEndMethod · 0.85
UpdatePreprocessorMethod · 0.85
UpdateMethod · 0.85
CheckForFunctionLengthsFunction · 0.85
CheckAccessFunction · 0.85
CheckSpacingFunction · 0.85
CheckSectionSpacingFunction · 0.85
CheckBracesFunction · 0.85
CheckEmptyLoopBodyFunction · 0.85
ReplaceableCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected