Re: Stuffing a NSMutableString with formatted C text
Re: Stuffing a NSMutableString with formatted C text
- Subject: Re: Stuffing a NSMutableString with formatted C text
- From: Pontus Ilbring <email@hidden>
- Date: Tue, 8 Mar 2005 20:04:27 +0100
On 2005-03-08, at 19.37, Frederick C. Lee wrote:
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.
asprintf and snprintf can do that.
Or you could try NSString's stringWithFormat: directly.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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