MCPcopy Index your code
hub / github.com/cpplint/cpplint / StripListPrefix

Function StripListPrefix

cpplint.py:2529–2534  ·  view source on GitHub ↗
(lst, prefix)

Source from the content-addressed store, hash-verified

2527 return file_path_from_root
2528
2529 def StripListPrefix(lst, prefix):
2530 # f(['x', 'y'], ['w, z']) -> None (not a valid prefix)
2531 if lst[: len(prefix)] != prefix:
2532 return None
2533 # f(['a, 'b', 'c', 'd'], ['a', 'b']) -> ['c', 'd']
2534 return lst[(len(prefix)) :]
2535
2536 # root behavior:
2537 # --root=subdir , lstrips subdir from the header guard

Callers 1

FixupPathFromRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected