Stuffing a NSMutableString with formatted C text
Stuffing a NSMutableString with formatted C text
- Subject: Stuffing a NSMutableString with formatted C text
- From: "Frederick C. Lee" <email@hidden>
- Date: Tue, 8 Mar 2005 10:37:19 -0800
Greetings:
I'm trying to incorporate some C code into Objective-C.
The following is a snippet of what I'm trying to harvest:
printf(".11s: %.*s\n", dbf->field_name,
dbf->field_length, value);
The output is 'standard output'. I need the output to go to a <string/char *> variable, preferably NSString or NSMutableString; NOT to a file or screen.
I can't find the appropriate C routine to merely direct it to a char * output (vs the screen/file) so I can read it into a NSString variable.
In short, I need to redirect the above logic to a variable that I can manipulate with Obj-C; not just to a file, or screen.
There must be a simple way to do this.
Any ideas?
Thanks,
Ric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden