Text
public struct Text
-
Encode a
String
toRSTaggedData
with a tag ofWellKnownTags
.text
Declaration
Swift
public static func encode(_ value: String) -> RSTaggedData?
Parameters
value
the
String
value to encodeReturn Value
An
RSTaggedData
object with the encoded data ornil
if an error is encountered in the encoding process -
Decode an
RSTaggedData
tagged withWellKnownTags
.text
to aString
Declaration
Swift
public static func decode(_ value: RSTaggedData) -> String?
Parameters
value
RSTaggedData
contianing data tagged withWellKnownTags
.text
Return Value
The decoded
String
ornil
if an error is encountered in the decoding process