MCPcopy Create free account
hub / github.com/alibaba/GraphScope / StripListPrefix

Function StripListPrefix

analytical_engine/misc/cpplint.py:2323–2328  ·  view source on GitHub ↗
(lst, prefix)

Source from the content-addressed store, hash-verified

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

Callers 1

FixupPathFromRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected