jamie_lynn
asked on
Character iterator
Hi,
I'm trying to iterate each character from a string.
What is the most efficient and best way?
i.e.
char *s = "abcdefg";
I want to loop that pops the first character.
So get 'a' then 'b', then 'c', 'd', etc.
Thanks
Jamie
I'm trying to iterate each character from a string.
What is the most efficient and best way?
i.e.
char *s = "abcdefg";
I want to loop that pops the first character.
So get 'a' then 'b', then 'c', 'd', etc.
Thanks
Jamie
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi jamie_lynn,
Just a quick extra.
This works too, you choose:
for ( ;*s; s++ ) {
}
Paul
Just a quick extra.
This works too, you choose:
for ( ;*s; s++ ) {
}
Paul
ASKER