Re: Formatted strings in Swift
Re: Formatted strings in Swift
- Subject: Re: Formatted strings in Swift
- From: Roland King <email@hidden>
- Date: Wed, 02 Jul 2014 16:18:50 +0800
Use an NSString( format:"%whatever", someint ). And file a bug.
https://devforums.apple.com/message/973494#973494
On 2 Jul, 2014, at 4:12 pm, Gerriet M. Denkmann <email@hidden> wrote:
> I want to do in Swift something like:
> printf("my var: %i5\n", someInt);
>
> I can do:
> println( "my var: " + String(someInt) )
>
> but I want all integers to have exactly 5 places.
>
> How can this be done?
>
> I read both Swift books, but did not see any formatting. Surely this must exist somewhere, but where?
>
> Gerriet.
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users 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.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden