Ad
  • Default User Avatar

    how does this account for double spaces? I had to write a much longer script to account for them, this is a much more elegant solution but could you explain how it works around spaces?

    Edit: Nevermind, I see it now. When splitting the string, any double spaces "seperate" an empty string that's included inside the list, so the double spacing is restored because when joining the list, a space is put in between the word and empty string, and again between the empty string and the next word.