string: add whitespace literalization? function

This converts all whitespace characters to their escape characters