Something
public text v1 · immutableString output = "I\\AM\\So\\Cool";
while (true) {
int pos = output.indexOf("\\");
if (pos == -1)
break;
int spacePos = output.indexOf(" ");
String tok = output.substring(0, pos);
String end = output.substring(pos+1);
if (spacePos == -1)
output = end + " " + tok;
else
output = end.substring(0, spacePos) + tok + end.substring(spacePos);
}