MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / StripListPrefix

Function StripListPrefix

steps/cpplint.py:2334–2339  ·  view source on GitHub ↗
(lst, prefix)

Source from the content-addressed store, hash-verified

2332 return file_path_from_root
2333
2334 def StripListPrefix(lst, prefix):
2335 # f(['x', 'y'], ['w, z']) -> None (not a valid prefix)
2336 if lst[:len(prefix)] != prefix:
2337 return None
2338 # f(['a, 'b', 'c', 'd'], ['a', 'b']) -> ['c', 'd']
2339 return lst[(len(prefix)):]
2340
2341 # root behavior:
2342 # --root=subdir , lstrips subdir from the header guard

Callers 1

FixupPathFromRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected