On Fri, Sep 2, 2016 at 10:02 PM, Gerriet M. Denkmann <[email protected]>
wrote:
>
> How to create a formatted string?
>
I use a little helper workaround that essentially looks like this:
let str = "hi".nulTerminatedUTF8
let padded = str.withUnsafeBufferPointer() {
return String(format: "%10s", $0.baseAddress!)
}
print(padded)
// prints: hi
_______________________________________________
Cocoa-dev mailing list ([email protected])
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]