In Python, a function called os.path.join()
allows concatenating multiple strings into one path using the path separator of the operating system. In Rust, there is only a function join()
that appends a string or a path to an existing path. This problem can't be solved with a normal function as a normal function needs to have a fixed number of arguments.
I'm looking for a macro that takes an arbitrary number of strings and paths and returns the joined path.
r
before "C:\"? I can see that without it the code doesn't compile, so I suppose it has to do with escaping the "\" character. – Condescend