• 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
Formatted strings in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Formatted strings in Swift


  • Subject: Formatted strings in Swift
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 02 Jul 2014 15:12:45 +0700

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


  • Follow-Ups:
    • Re: Formatted strings in Swift
      • From: Roland King <email@hidden>
  • Prev by Date: Xcode 5. You can zoom in a storyboard, but not in an XIB? Am I correct here?
  • Next by Date: Re: Formatted strings in Swift
  • Previous by thread: Re: Xcode 5. You can zoom in a storyboard, but not in an XIB? Am I correct here?
  • Next by thread: Re: Formatted strings in Swift
  • Index(es):
    • Date
    • Thread