MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / StripListPrefix

Function StripListPrefix

src/tests/coding/cpplint.py:2319–2324  ·  view source on GitHub ↗
(lst, prefix)

Source from the content-addressed store, hash-verified

2317 return file_path_from_root
2318
2319 def StripListPrefix(lst, prefix):
2320 # f(['x', 'y'], ['w, z']) -> None (not a valid prefix)
2321 if lst[:len(prefix)] != prefix:
2322 return None
2323 # f(['a, 'b', 'c', 'd'], ['a', 'b']) -> ['c', 'd']
2324 return lst[(len(prefix)):]
2325
2326 # root behavior:
2327 # --root=subdir , lstrips subdir from the header guard

Callers 1

FixupPathFromRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected