Re: How to concatenate two values?
Re: How to concatenate two values?
- Subject: Re: How to concatenate two values?
- From: Guy English <email@hidden>
- Date: Thu, 3 Mar 2005 18:31:07 -0500
I think you want:
completeString = [NSString stringWithFormat: @"%@ %@", myPath, now];
see the docs on NSCalendarData for getting localized & formatted
strings back from them.
stringWithFormat works like printf except it adds the %@ specifier
which indicates the argument is an NSObject subclass. These arguments
will have "description" called on them which returns a string object.
See the docs for more info. From the pesudo code I assume you're new
to C based languages - you may want to check out some basic C / printf
docs to get an idea of how it works.
Guy
On Thu, 3 Mar 2005 15:20:03 +0100, Ronald Hofmann <email@hidden> 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