MCPcopy Create free account
hub / github.com/apache/mesos / StripListPrefix

Function StripListPrefix

support/cpplint.py:1847–1852  ·  view source on GitHub ↗
(lst, prefix)

Source from the content-addressed store, hash-verified

1845 return file_path_from_root
1846
1847 def StripListPrefix(lst, prefix):
1848 # f(['x', 'y'], ['w, z']) -> None (not a valid prefix)
1849 if lst[:len(prefix)] != prefix:
1850 return None
1851 # f(['a, 'b', 'c', 'd'], ['a', 'b']) -> ['c', 'd']
1852 return lst[(len(prefix)):]
1853
1854 # root behavior:
1855 # --root=subdir , lstrips subdir from the header guard

Callers 1

FixupPathFromRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected