Joined: 19 Feb 2005 Posts: 11 Location: new york usa
parsing strings
Posted: Tue Dec 13, 2005 1:49 pm
I am trying to parse a variable length string being returned by a barcode scanner. The string can be up to 20 characters long. for example: "<12345>678321". I need to capture only the characters between the "< >" characters.
strncpy(NewStrg, Strg+3,20) will give me the string without he first
"<" .
I have tried this:
valueptr = strchr(NewStrg, '>');
for(x=0; x<valueptr ; x++)
{
NewestStrg[x]=NewStrg[x];
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum