• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Formatted strings in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Formatted strings in Swift (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Formatted strings in Swift
  • Next by Date: Unsigned Int in Swift
  • Previous by thread: Formatted strings in Swift
  • Next by thread: Unsigned Int in Swift
  • Index(es):
    • Date
    • Thread