MCPcopy Index your code
hub / github.com/nodejs/node / StripListPrefix

Function StripListPrefix

tools/cpplint.py:2574–2579  ·  view source on GitHub ↗
(lst, prefix)

Source from the content-addressed store, hash-verified

2572 return file_path_from_root
2573
2574 def StripListPrefix(lst, prefix):
2575 # f(['x', 'y'], ['w, z']) -> None (not a valid prefix)
2576 if lst[: len(prefix)] != prefix:
2577 return None
2578 # f(['a, 'b', 'c', 'd'], ['a', 'b']) -> ['c', 'd']
2579 return lst[(len(prefix)) :]
2580
2581 # root behavior:
2582 # --root=subdir , lstrips subdir from the header guard

Callers 1

FixupPathFromRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…