Yes, but it also removes duplicate slashes (my version below might be a bit more obvious?)