Re: Text concatenation
Re: Text concatenation
- Subject: Re: Text concatenation
- From: Kay Roepke <email@hidden>
- Date: Fri, 4 Mar 2005 00:47:02 +0100
On 3. Mar 2005, at 17:53 Uhr, Ronald Hofmann wrote:
this works: [fullName setStringValue:NSFullUserName()];
this does not work: [fullName setStringValue: @"Willkommen " +
NSFullUserName()];
Well, this ain't C++ ;-)
Objective-C doesn't do operator overloading, so you have to concatenate
the strings differently:
[fullName setStringValue: [@"Willkommen" stringByAppendingString:
NSFullUsername()]];
or maybe:
[fullName setStringValue: [NSString stringWithFormat:@"%@ %@",
@"Willkommen", NSFullUsername()]];
Regards,
Kay
P.S.: please do not crosspost...
_______________________________________________
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