Re: How to concatenate two values?
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