Data
public extension Data
-
Undocumented
Declaration
Swift
var hexEncodedString: String { get } -
Undocumented
Declaration
Swift
init?(hexEncodedString: String) -
MARK:- Conversion from intrinsic types to Data
Declaration
Swift
mutating func append(_ value: UInt8) -
Undocumented
Declaration
Swift
mutating func append(_ value: UInt16) -
Undocumented
Declaration
Swift
mutating func append(_ value: UInt32) -
Undocumented
Declaration
Swift
mutating func append(_ value: UInt64) -
Undocumented
Declaration
Swift
mutating func append(_ value: Int8) -
Undocumented
Declaration
Swift
mutating func append(_ value: Int16) -
Undocumented
Declaration
Swift
mutating func append(_ value: Int32) -
Undocumented
Declaration
Swift
mutating func append(_ value: Int64) -
Undocumented
Declaration
Swift
mutating func append(_ value: UIntBig) -
Undocumented
Declaration
Swift
mutating func append(_ value: Float16) -
Undocumented
Declaration
Swift
mutating func append(_ value: Float32) -
Encode string as data, inserting length as prefix using UInt8,…,64. Returns true if successful, false otherwise.
Declaration
Swift
mutating func append(_ value: String, _ encoding: StringLengthEncodingOption = .UINT8) -> Bool -
MARK:- Conversion from data to intrinsic types Get Int8 from byte array (little-endian).
Declaration
Swift
func int8(_ index: Int) -> Int8? -
Get UInt8 from byte array (little-endian).
Declaration
Swift
func uint8(_ index: Int) -> UInt8? -
Get Int16 from byte array (little-endian).
Declaration
Swift
func int16(_ index: Int) -> Int16? -
Get UInt16 from byte array (little-endian).
Declaration
Swift
func uint16(_ index: Int) -> UInt16? -
Get Int32 from byte array (little-endian).
Declaration
Swift
func int32(_ index: Int) -> Int32? -
Get UInt32 from byte array (little-endian).
Declaration
Swift
func uint32(_ index: Int) -> UInt32? -
Get Int64 from byte array (little-endian).
Declaration
Swift
func int64(_ index: Int) -> Int64? -
Get UInt64 from byte array (little-endian).
Declaration
Swift
func uint64(_ index: Int) -> UInt64? -
Get UIntBig from byte array
Declaration
Swift
func uintBig(_ index: Int) -> (value: UIntBig, start: Int, end: Int)? -
Undocumented
Declaration
Swift
func string(_ index: Int, _ encoding: StringLengthEncodingOption = .UINT8) -> (value: String, start: Int, end: Int)?
Data Extension Reference