[swift-users] Printing large hexadecimal values

Ken Burgett kenb at iotone.io
Wed May 25 14:10:19 CDT 2016


On 2016-05-25 12:00, Jens Alfke wrote:
>> On May 25, 2016, at 11:11 AM, Ken Burgett <kenb at iotone.io> wrote:
>> 
>> the "%llx" field is not getting interpreted...
> 
> You have to import Foundation to bring in the String.init(format:…)
> method, which is bridged from Foundation's NSString class.
> (This is a temporary inconvenience until the Swift standard library is
> complete.)
> 
> —Jens
Hi Jens,

You are correct, the "%llx" works for UInt64, while "%16x" does not. 
"%llX" also works, producing an uppercase string.

Should this be reported as a bug?
-- 
Ken Burgett
Principal Software Engineer
Email: kenb at iotone.io
Office: 530.693.4449
Mobile: 831.332.6846
URL: www.iotone.co


More information about the swift-users mailing list