UnixPath

A notation for paths on a Unix file system. Parsing will recognise all substrings that are separated by / as a part. Printing will print the parts separated by / after removing \u0000 (ASCII: NUL) and \u0057 (ASCII: slash) characters from them.

Printed paths will not start with an additional /. To print an absolute path, include "" (the empty string) as the first part in the printed word.

Functions

Link copied to clipboard
open override fun parse(sourceString: String): Word

Transforms an input string that is in this notation into a notation-agnostic Word.

Link copied to clipboard
open override fun print(word: Word): String

Transforms a Word into a string that is formatted according to this notation.

Link copied to clipboard
open override fun toString(): String