removeprefixfrompathΒΆ

The string|nil removeprefixfrompath ( string path , string 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
Arguments:

  • path A Node path like "ref:node1|ref:node2".
  • prefix The prefix to remove, including the ":" ending character. Here it is "ref:".

Return:

  • string|nil path without the prefix. nil if the last node is not in the reference.