Member-only story
Prerequisites:
You will be expected to be able to run and use Swift’s Playgrounds
Keywords and Terminology:
String Format Specifiers: This article summarises the format specifiers supported by string formatting methods and functions.
Apple already have a Strings Programming guide for String Format Specifiers, but how are these actually used? In steps this guide
Common formatting
%d, %D
$d
and %D
represent a signed 32-bit Integer, that is an Int.
In the most basic case we can use the initializer for String to format the Integer
Interpolate with %d
let basicNumber: Int =…