• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Text concatenation, problem solved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text concatenation, problem solved


  • Subject: Re: Text concatenation, problem solved
  • From: Ronald Hofmann <email@hidden>
  • Date: Fri, 4 Mar 2005 05:36:11 +0100

Thanks a lot for all the advices.

Regards, Ronald
===============
Am 04.03.2005 um 01:04 schrieb Karl Kraft:

On Mar 3, 2005, at 8:53 AM, Ronald Hofmann wrote:

Hi all,

this works: [fullName setStringValue:NSFullUserName()];

this does not work: [fullName setStringValue: @"Willkommen " + NSFullUserName()];

What is wrong? Any advices?


The + operator does not concatenate strings. Use this instead

NSString *s = [NSString stringWithFormat:@"Wilommen %@",NSFullUserName()];
[fullName setStringValue:s];


or

NSString *s = @"Willkommen ";
s = [s stringByAppendingString:NSFullUserName()];
[fullName setStringValue:s];



_______________________________________________ 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
References: 
 >Text concatenation (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: Curious debugging behavior
  • Next by Date: Re: How do i wrap a set of flies?
  • Previous by thread: Re: Text concatenation
  • Next by thread: dataWithPDFInsideRect problem
  • Index(es):
    • Date
    • Thread