PathParser.pop

Pop the rightmost element off this path, stripping off a trailing '/' as appropriate:

  • /x/y/z => /x/y
  • /x/y/ => /x/y (note trailing '/' in the original)
  • /x/y => /x
  • /x => /
  • / => empty

Note that this returns a path suitable for splitting into path and name components (there's no trailing separator).

struct PathParser
cstring
pop
()

Meta