How do I remove a non-breaking space in Ruby
ruby
Solution
irb(main):001:0> d = "foo\u00A0\bar"
=> "foo \bar"
irb(main):002:0> d.gsub("\u00A0", "")
=> "foo\bar"
Problem
I have a string that looks like this: ``` d = "foo\u00A0\bar" ``` When I check the length, it says that it is 7 characters long. I checked online and found out that it is a non-breaking space. Could someone show me how to remove all the non-breaking spaces in a string?