Thanks for the links @Sicro.
The MSDN link was broken, here is the fixed version:
https://msdn.microsoft.com/en-us/librar ... hseparator
I was recently looking at some Node.js libraries for handling path string operations, and I came across some really cool functions. For example, the path normalize function:
https://nodejs.org/api/path.html#path_p ... alize_path
The path.normalize() method normalizes the given path, resolving '..' and '.' segments.
When multiple, sequential path segment separation characters are found (e.g. / on POSIX and \ on Windows), they are replaced by a single instance of the platform specific path segment separator. Trailing separators are preserved.
If the path is a zero-length string, '.' is returned, representing the current working directory.
... and many other cross-platform functions dealing with path operations. It would be nice to see an implementation of similar functions in PB, and maybe even have them as a built-in library one day.
I think it would make sense, after all PB already offers a CGI library and other libs and commands which make it good at creating server/client applications, as well as general purpose console apps. Surely, some more functions for handling path (file) operations would be a good enhancement in that direction. But even a custom library. or bindings/wrappers to existing libs would be great in this respect.