Replacing hex values in a string (v1.0)
jicman
cabrera_ at _wrc.xerox.com
Fri Aug 12 09:19:12 PDT 2011
Greetings and salutations.
Hi. I am reading a file into a string,
char[] text = cast(string) f0.read();
and I want to replace every non-breaking space in the string. I know that the hex value for that is A0, but when I do this call,
text = std.string.replace(text,x"A0"," ");
It does takes it out, but it adds (or leaves) a little square to it. Apparently, it leaves something else, there. It would be nice if std.string had a function to go from hex to decimal and back.
Any ideas?
thanks,
josé
More information about the Digitalmars-d-learn
mailing list