I can\'t remove whitespaces from a string.
My HTML is:
Cena pro Vás: 139 Kč
strip
only removes ASCII whitespace and the character you've got here is a Unicode non-breaking space.
Removing the character is easy. You can use gsub
by providing a regex with the character code:
gsub(/\u00a0/, '')
You could also call
gsub(/[[:space:]]/, '')
to remove all Unicode whitespace. For details, check the Regexp documentation.