Re: NSString format parameter order
Re: NSString format parameter order
- Subject: Re: NSString format parameter order
- From: "Jere Gmail" <email@hidden>
- Date: Tue, 8 Apr 2008 12:21:16 +0200
Woo. If that's true is just what I was looking for.
Thank you. I'll try it when I get back home
On Tue, Apr 8, 2008 at 12:10 PM, <email@hidden> wrote:
>
> On 8 Apr 2008, at 11:33, Jere Gmail wrote:
>
> > I'm looking for a way to switch parameters order in order to use the
> > same parameters for different languages.
> > something like
> >
> > NSString string1=@"you"
> > NSString string1=@"hello"
> > NSString str=[NSString stringWithFormat:@"%2 %1", string1,string2];
> >
> > will make str value "hello you".
> > I have been working with CString over in windows and it is possible
> > but i don't find any alternatives
> >
>
>
> I might have missed something, but it seems that in your case you want the
> following:
>
> NSString* string1=@"you"
> NSString* string2=@"hello"
>
> NSString* str=[NSString stringWithFormat:@"%2$@ %1$@", string1, string2];
>
> That should give you "hello you".
>
> Matt
>
--
http://zon7blog.wordpress.com/
And again we fall.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden