I would like to know how to replace a certain type of character in a stringw i looked over the API and found .replace(T,T) so i Assumed that the below code would work.
Code: Select all
stringw str = ModelName[List].c_str() ;
str += " - ";
str += List;
str.replace(L" ",L"_");
What i want the code to do is replace any spaces in str with an underscore "_" and that is it. but obviously this is not a simple process either as with many other things with irrlicht though i must admit this is alot easier to use then most other graphics frameworks its just these niggly things that bother me.
What exactly does .replace do and am i using it correctly if not could somebody please help by giving me the correct code and also explaining why it is wrong as i personally cannot see any thing wrong with the code that i am using
Cheers
DGENXP