wxString Newbie

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
vpadilla
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Jan 19, 2005 8:54 pm

wxString Newbie

Post by vpadilla »

I am trying to remove the zero out of the string "05" to make it a numeral 5. I can't seem to get Strip to work. Would anyone care to help me please?

Thanks in advance. :D [/b]
cg
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 201
Joined: Sun Aug 29, 2004 12:33 am
Location: Canada
Contact:

Post by cg »

wxString s = "05";
s.Replace("05","5");

:D

CG
cg
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 201
Joined: Sun Aug 29, 2004 12:33 am
Location: Canada
Contact:

Post by cg »

wxString s = "05";
int i = wxAtoi(s);

CG
vpadilla
Earned a small fee
Earned a small fee
Posts: 18
Joined: Wed Jan 19, 2005 8:54 pm

Post by vpadilla »

Thank you. It works.
Post Reply