• 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: How to concatenate two values?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to concatenate two values?


  • Subject: Re: How to concatenate two values?
  • From: Scott Mitchell <email@hidden>
  • Date: Thu, 3 Mar 2005 16:33:12 -0700

You can do it like this:

NSString* myPath = NSHomeDirectory();
NSCalendarDate *now = [NSCalendarDate calendarDate];//this is a date value

[myPath stringByAppendingString:[now description]];

Look at the docs for NSCalendarDate and you see you can get the data as an NSString with <x-tad-smaller>- (</x-tad-smaller><x-tad-smaller>NSString</x-tad-smaller><x-tad-smaller> *)description

Hope this helps.
</x-tad-smaller>

Thanks,
Scott Mitchell
Macintosh Software Engineer
Excelsior Software
http://www.excelsiorsoftware.com

On Mar 3, 2005, at 5:35 AM, Ronald Hofmann wrote:

Hi everybody,
first of all I would like to say thank you to the people who help us newcomers with great hints.

My problem is as follows:
I have values which already work fine.

NSCalendarDate *now=[NSCalendarDate calendarDate];//this is a date value
NSString *myPath = NSHomeDirectory();//this is a string value

I want to concatenate both values.

Something like "myString= myPath&now;" but this does not work because of the diffenrent types.

I can“t find how to do this. Any hints out there?

tia, Ronald
===============
_______________________________________________
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

 _______________________________________________
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: 
 >How to concatenate two values? (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: Re: How to concatenate two values?
  • Next by Date: Text concatenation
  • Previous by thread: Re: How to concatenate two values?
  • Next by thread: Text concatenation
  • Index(es):
    • Date
    • Thread