marsh.path
¶
Path tools that work with any separator character.
- iterative_split(path, delimiter='.')[source]¶
Iterate through the fields in a path.
Escaped or quoted (unescaped quotes) delimiters will become part of a field instead of splitting it into more fields. Quotes are removed from the final fields.
- split(path, delimiter='.')[source]¶
Split the fields of a path.
Escaped or quoted (unescaped quotes) delimiters will become part of a field instead of splitting it into more fields. Quotes are removed from the final fields.
- escape_field(field, delimiter='.')[source]¶
Escape all delimiters and quotes found in a field.
This may be done to maintain the original field when it becomes part of a path that is later split back into fields.
- strip_delimiter(field_or_path, delimiter='.')[source]¶
Remove any delimiters from the start and end of a field or path.
Escaped delimiters are not removed.