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 11:48:55 +0200
Well, it's not a language thing at this moment but it started this way.
Right now I have a txt file with one string with the places where the
fields should be. I use it as a template to generate an HTML from some
fields obtained from and XML.
This way I can change the page displayed without having to recompile
the application.
On Tue, Apr 8, 2008 at 11:41 AM, Michael Vannorsdel <email@hidden> wrote:
> There's quite a few printf arguments the Mac OS doesn't support right now.
> An alternative is to shuffle pointers around:
>
> NSString * string1 = @"you", * string2 = @"hello";
>
> ...
>
> if([language isEqualToString:@"Backwards Latin"])
> {
> NSString * temp = string1;
>
> string1 = string2;
> string2 = temp;
> }
>
> NSString * str = [NSString stringWithFormat:@"%@ %@", string1, string2];
>
>
>
> On Apr 8, 2008, at 3:33 AM, 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
> >
>
> _______________________________________________
>
> 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
>
--
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