Array

extension Array where Element == Flow.Cadence.FValue
extension Array where Element == UInt8

Available where Element == Flow.Cadence.FValue

Available where Element == UInt8

  • Convert bytes to hex string

    Declaration

    Swift

    public var hexValue: String { get }
  • Mutate data with adding zero padding to the left until fulfil the block size

    Declaration

    Swift

    public mutating func padZeroLeft(blockSize: Int) -> [UInt8]

    Parameters

    blockSize

    The size of block.

    Return Value

    self in Data type.

  • Mutate data with adding zero padding to the right until fulfil the block size

    Declaration

    Swift

    public mutating func padZeroRight(blockSize: Int) -> [UInt8]

    Parameters

    blockSize

    The size of block.

    Return Value

    self in Data type.

  • Add zero padding to the left until fulfil the block size

    Declaration

    Swift

    public func paddingZeroLeft(blockSize: Int) -> [UInt8]

    Parameters

    blockSize

    The size of block.

    Return Value

    A new [UInt8] type with padding zero.

  • Add zero padding to the right until fulfil the block size

    Declaration

    Swift

    public func paddingZeroRight(blockSize: Int) -> [UInt8]

    Parameters

    blockSize

    The size of block.

    Return Value

    A new [UInt8] type with padding zero.