|
|
User login
Feeds |
i'd like to change the specific charactor.....
|
|||||
| Mon, 2005-08-01 13:41 | |
|
i want to change the specific charactor in the middle of string to some charactor....
using for loop....but it didn't work.....i don't know i can't find anything wrong.... is this right?? _LIT16(ch,"+"); for(int i=0;i<= aUri.Length(); i++) { if( aUri[i]=' ') { aUri.Replace(i,1,ch); } } i want to replace 'space' in the string to '+'..... is this possible?? or should i use different way?? plz tell me anyone know~~~ |
|
Forum posts: 192
Forum posts: 192
const TChar KSeparator = ' ';
TLex16 lex(aUri);
while (lex.Peek())
{
if (lex.Get() == KSeparator)
{
aUri.Replace(lex.Offset() - 1, 1, KAddition);
}
}
Forum posts: 8
i'm very lucky to find this forum....this site very useful to me...thanks....