MCPcopy Create free account
hub / github.com/BVLC/caffe / Match

Function Match

scripts/cpp_lint.py:519–526  ·  view source on GitHub ↗

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

(pattern, s)

Source from the content-addressed store, hash-verified

517 linenum in _error_suppressions.get(None, set()))
518
519def Match(pattern, s):
520 """Matches the string with the pattern, caching the compiled regexp."""
521 # The regexp compilation caching is inlined in both Match and Search for
522 # performance reasons; factoring it out into a separate function turns out
523 # to be noticeably expensive.
524 if pattern not in _regexp_compile_cache:
525 _regexp_compile_cache[pattern] = sre_compile.compile(pattern)
526 return _regexp_compile_cache[pattern].match(s)
527
528
529def ReplaceAll(pattern, rep, s):

Callers 15

IsInAlphabeticalOrderMethod · 0.85
CheckMethod · 0.85
CleanseRawStringsFunction · 0.85
__init__Method · 0.85
CheckEndMethod · 0.85
CheckEndMethod · 0.85
UpdatePreprocessorMethod · 0.85
UpdateMethod · 0.85
CheckForFunctionLengthsFunction · 0.85
CheckAccessFunction · 0.85
CheckSpacingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected