What would be a good way to replace every one or more spaces (" ") in a string with just one space? Or replace any number of newlines with just one?