Structure

UInt8

An 8-bit unsigned integer value type.

Topics

Initializers

init?(String, radix: Int)

Creates a new integer value from the given string and radix.

init(ascii: Unicode.Scalar)

Construct with value v.value.

Beta
init(bigEndian: UInt8)

Creates an integer using the specified big-endian representation, changing the byte order if necessary.

Beta
init(bitPattern: Int8)

Creates a new instance with the same memory representation as the given value.

init(littleEndian: UInt8)

Creates an integer using the specified little-endian representation, changing the byte order if necessary.

Beta

Instance Properties

var bigEndian: UInt8

The big-endian representation of this integer.

Beta
var byteSwapped: UInt8

A representation of this integer with the byte order swapped.

Beta
var countRepresentedWords: Int

The number of words used for the current binary representation of this value.

Beta
var customMirror: Mirror

A mirror that reflects the UInt8 instance.

var description: String

A textual representation of this value.

var hashValue: Int

The integer’s hash value.

var littleEndian: UInt8

The little-endian representation of this integer.

Beta
var magnitude: UInt8

The magnitude of this value.

Beta

Type Properties

static var isSigned: Bool

A Boolean value indicating whether this type is a signed integer type.

Beta
static var max: UInt8

The maximum representable integer in this type.

static var min: UInt8

The minimum representable integer in this type.

Instance Methods

func unsafeAdding(UInt8)

Returns the sum of this value and the given value without checking for arithmetic overflow.

Beta
func unsafeDivided(by: UInt8)

Returns the quotient of dividing this value by the given value without checking for arithmetic overflow.

Beta
func unsafeMultiplied(by: UInt8)

Returns the product of this value and the given value without checking for arithmetic overflow.

Beta
func unsafeSubtracting(UInt8)

Returns the difference of this value and the given value without checking for arithmetic overflow.

Beta

Operator Functions

static func !=(UInt8, UInt8)

Returns a Boolean value indicating whether two values are not equal.

Beta
static func !=<Other>(UInt8, Other)

Returns a Boolean value indicating whether the two given values are not equal.

Beta
static func &(UInt8, UInt8)

Returns the result of performing a bitwise AND operation on the two given values.

Beta
static func &*(UInt8, UInt8)

Returns the product of the two given values, discarding any overflow.

Beta
static func &+(UInt8, UInt8)

Returns the sum of the two given values, discarding any overflow.

Beta
static func &-(UInt8, UInt8)

Returns the difference of the two given values, discarding any overflow.

Beta
static func &<<(UInt8, UInt8)

Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width.

Beta
static func &<<<Other>(UInt8, Other)

Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width.

Beta
static func &<<=(inout UInt8, UInt8)

Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.

Beta
static func &<<=<Other>(inout UInt8, Other)

Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.

Beta
static func &>><Other>(UInt8, Other)

Returns the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width.

Beta
static func &>>(UInt8, UInt8)

Returns the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width.

Beta
static func &>>=(inout UInt8, UInt8)

Calculates the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.

Beta
static func &>>=<Other>(inout UInt8, Other)

Calculates the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.

Beta
static func ...(UInt8)

Returns a countable partial range extending upward from a lower bound.

Beta
static func ...(UInt8)

Returns a partial range up to, and including, its upper bound.

Beta
static func ...(UInt8)

Returns a partial range extending upward from a lower bound.

Beta
static func ..<(UInt8)

Returns a partial range up to, but not including, its upper bound.

Beta
static func <<Other>(UInt8, Other)

Returns a Boolean value indicating whether the value of the first argument is less than that of the second argument.

Beta
static func <<<Other>(UInt8, Other)

Returns the result of shifting a value’s binary representation the specified number of digits to the left.

Beta
static func <=(UInt8, UInt8)

Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.

Beta
static func <=<Other>(UInt8, Other)

Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.

Beta
static func ==<Other>(UInt8, Other)

Returns a Boolean value indicating whether the two given values are equal.

Beta
static func ><Other>(UInt8, Other)

Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.

Beta
static func >(UInt8, UInt8)

Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.

Beta
static func >=(UInt8, UInt8)

Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.

Beta
static func >=<Other>(UInt8, Other)

Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.

Beta
static func >><Other>(UInt8, Other)

Returns the result of shifting a value’s binary representation the specified number of digits to the right.

Beta
static func ^(UInt8, UInt8)

Returns the result of performing a bitwise XOR operation on the two given values.

Beta
static func |(UInt8, UInt8)

Returns the result of performing a bitwise OR operation on the two given values.

Beta

See Also

Unsigned Integers

struct UInt

An unsigned integer value type.

struct UInt16

A 16-bit unsigned integer value type.

struct UInt32

A 32-bit unsigned integer value type.

struct UInt64

An unsigned integer value type.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software