common method for extending string-like objects
common method for finding the path separator for a given data type
(-to-string x)