removeprefixfrompath

guerilla.removeprefixfrompath(path, prefix)

Remove a prefix of all the names in a node path

Assuming the prefix is “ref:” here is some exemples :
  • “ref:name” -> “name”
  • “ref:dir|ref:name” -> “dir|name”
  • “dir|ref:dir2|ref:name” -> “dir2|name”
  • “name” -> nil
  • “ref2:name” -> nil
    param path:A Node path like “ref:node1|ref:node2”.
    type path:str
    param prefix:The prefix to remove, including the “:” ending character. Here it is “ref:”.
    type prefix:str
    return:path without the prefix. None if the last node is not in the reference.
    rtype:The