Re: sscanf problem
Re: sscanf problem
- Subject: Re: sscanf problem
- From: Mike Davis <email@hidden>
- Date: Wed, 28 Jan 2004 14:03:29 +0000
Hi David,
Consider using NSScanner. I think I know what you're trying to read ;-)
Regards,
Mike.
On 28 Jan 2004, at 1:44 pm, email@hidden wrote:
Hello,
I've got a strange problem using sscanf:
const char *s;
char theString[ 256 ];
s = "123 456 \"blah\"";
int theInt1;
int theInt2;
sscanf( s, "%d %d \"%s\"", &theInt1, &theInt2, theString );
NSLog(@"%@",[NSString stringWithCString:theString]);
This returns a string 'blah"' - and i've no idea why i get a quote
sign at
the end of the string.
Anyone knows why this happens and how to fix that?
Thanks
David
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.