formatted strings in Swift
formatted strings in Swift
- Subject: formatted strings in Swift
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sat, 03 Sep 2016 12:02:04 +0700
Did in a playground:
let s = String(format: "%2s → %2s", "a", "b")
print(“formatted = \"\(s)\"")
But this prints random garbage (e.g.: formatted = “‡“S → ‡“S”) (no error message or compiler warning).
Why?
How to create a formatted string?
Gerriet.
_______________________________________________
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