Bolivar
Saturday, 24 August 2013
Remove hex escape from string
Remove hex escape from string
I have the following hex as a string: "\xfe\xff". I'd like to convert this
to "feff". How do I do this?
The closest I got was "\xfe\xff".inspect.gsub("\\x", ""), which returns
"\"FEFF\"".
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment