View Single Post
Unread 16 Oct 2003, 17:42   #7
SbOlly
Spelling is for pussies
 
SbOlly's Avatar
 
Join Date: Mar 2003
Location: Actually, where the feck am I........?
Posts: 446
SbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant future
Re: Text parsing with standard C

Try this (It may work, I'm nowhere near a compiler to check it out myself)

int Count = 0;
int InternalCount = 0;
char *source = MyXMLCode;
char *target = ThePlaceImPuttingMyMenus;
while(*(source + Count) != '\0') Count++;
while((*(source + InternalCount) != '<') & (InternalCount != Count)) InternalCount++;
InternalCount++;
while((*(source + InternalCount) != '>') & (InternalCount != Count)) *target++ = *(source+InternalCount++);
*target = '\0';
__________________
If God made me in his image, he's one fat ugly biatch.

I always get the soggy biscuit

Veni Vidi Codi
SbOlly is offline   Reply With Quote