OR
Sorry,
but he said chr== ' ' OR chr == '<'. And you say && which means AND, therefore you will never find a char which is both: ' ' AND '<'.
I think you have to use || which means OR instead of && (= AND)!
Also if you use "do { .. } while(..)" , the pointer gets decremented and afterwards compared to the while statement. Therefore you loose the first character.
Better use:
while(chr != ' ' || chr !='<') {
chr--; // or *chr-- whatever is reqd.
}
Here the value of the pointer gets compared first and then decremented!
hope I am right,
have fun
darkspace