Re: NSString newbie question
Re: NSString newbie question
- Subject: Re: NSString newbie question
- From: Glenn Zelniker <email@hidden>
- Date: Wed, 15 Mar 2006 11:12:09 -0500
On Mar 15, 2006, at 11:07 AM, Bobby B wrote:
I'm trying to do something similar w/ ObcJ/Cocoa, and I've come up
with this:
NSString * myStr = @"Rating: (";
NSString * myStr1 = [myStr stringByAppendingString:[ratingOutlet
stringValue]];
NSString * myStr2 = [myStr1 stringByAppendingString:@"/10)"];
[ratingTextOutlet setStringValue:myStr2];
It seems that the only way I can get what I want is to declare a new
nsstring variable each time I need to append something. Does that
seem right? I've read all the nsstring tutorials I could find on
different sites. Is this just the way?
Take a look at NSMutableString and the -appendString and -
appendFormat methods.
GZ
_______________________________________________
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