tokhi tokhi - 1 year ago 141
Ruby Question

extract and convert any ascii code from a string

How can I extract the ascii code from a string and then convert it to char?

string = "a – b"


a – b

Answer Source

Use CGI library from ruby

CGI.unescapeHTML("a – b")
#=> "a – b"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download