charCode 160 is also a non-breaking space, could you modify it so that it also trims it? 'if(input.charCodeAt(i - 1) > 32 && input.charCodeAt(i) != 160)'
charCode 160 is also a non-breaking space, could you modify it so that it also trims it?
'if(input.charCodeAt(i - 1) > 32 && input.charCodeAt(i) != 160)'