Topics
Logical Values
struct Bool
A value type whose instances are either true
or false
.
Numeric Values
struct Int
A signed integer value type.
struct Double
A double-precision, floating-point value type.
struct Float
A single-precision, floating-point value type.
Ranges
struct Range
A half-open interval over a comparable type, from a lower bound up to, but not including, an upper bound.
struct ClosedRange
An interval over a comparable type, from a lower bound up to, and including, an upper bound.
Errors
protocol Error
A type representing an error value that can be thrown.
Optionals
enum Optional
A type that represents either a wrapped value or nil
, the absence of a value.
Advanced Numerics
Write generic code that works with any numeric type.
Work with fixed-width numeric types of different sizes.
Use these functions with numeric values and other comparable types.
See Also
Values and Collections
Work with text using Unicode-safe strings.
Store and organize data using arrays, dictionaries, sets, and other data structures.