IotaConverter
public class IotaConverter
Iota Converter utils, used to convert trytes, trits to/from String and other kinds of conversion.
-
Converts an ASCII string to Trytes.
Declaration
Swift
public static func trytes(fromAsciiString input: String) -> String?
Parameters
input
An ASCII String.
Return Value
Trytes as String if the input is valid,
nil
otherwise. -
Converts Trytes to ASCII string.
Declaration
Swift
public static func asciiString(fromTrytes inputTrytes: String) -> String?
Parameters
inputTrytes
Trytes as String.
Return Value
ASCII String if the input is valid,
nil
otherwise. -
Converts an Array of Trits to String.
Declaration
Swift
public static func string(fromTrits trits: [Int]) -> String
Parameters
trits
An Array of Trits.
Return Value
A String from Trits.
-
Converts a String to an Array of Trits.
Declaration
Swift
public static func trits(fromString string: String) -> [Int]
Parameters
string
A valid String, all the invalid characters will be skipped.
Return Value
An Array of Trits.