# Discussion Board

1. Just wondering does anyone know how to write a string backwards one character at time with one second gap?...Been trying to found out but just cant find it!

Thank you

2. I think you need to create a timer with one second interval. Then for each time tick, read a character of the string one by one from the end.

Antony

3. for(TInt i=0; i<buffer.Length(); i++)
{
a= buffer[i];
User::After(1000000);//delay of 1 second
}

4. Originally Posted by kkrish
for(TInt i=0; i<buffer.Length(); i++)
{
a= buffer[i];
User::After(1000000);//delay of 1 second
}

And so if you use this for a string 1000 characters long your code with become totally unresponsive for 1000 seconds.

5. That's why I would propose to use timer. Print the string when the timer is outstanding.

Antony

6. its depends on requirement, what he need? i have just given a way to do you ar4e right it take time it just on the programmer how he would like to implement.

hope you can understand guys,

With Best Regards,
KKrish

7. Hello and thanks for you help!

Code:
```TInt back = ichic.Length()-1;
for(TInt i=0; i<ichic.Length(); i++)
{
console->Printf(_L("%c"),ichic[back]);
User::After(1000000);//delay of 1 second
back--;```
Also does anyone know how to count letters?

I have figured out how to Delete them by using this but how do I count them and prints to console?

Code:
```TInt Letter = 0;
while (Letter !=KErrNotFound)
{
Letter = ichic.Locate('a');
if (Letter !=KErrNotFound )
{
ichic.Delete(Letter,1);
}```
Thanks

8. Hi,

Simply you can use counter.
Code:
```TInt Letter = 0;
TInt cnt=0;
while (Letter !=KErrNotFound)
{
Letter = ichic.Locate('a');
if (Letter !=KErrNotFound )
{
cnt++;
ichic.Delete(Letter,1);
}
}```
I hope i have understood your problem in right way, haven't i?

Kiran.

9. kiran10182

Yup you did!....Thanks I was just coming on here to delete that message cause I figured it myself!...Thanks for your help!

10. you can user Mid function to get the character from the TBuf.

hope this would be helpful to you.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.