Text

public struct Text
  • Encode a String to RSTaggedData with a tag of WellKnownTags.text

    Declaration

    Swift

    public static func encode(_ value: String) -> RSTaggedData?

    Parameters

    value

    the String value to encode

    Return Value

    An RSTaggedData object with the encoded data or nil if an error is encountered in the encoding process

  • Decode an RSTaggedData tagged with WellKnownTags.text to a String

    Declaration

    Swift

    public static func decode(_ value: RSTaggedData) -> String?

    Parameters

    value

    RSTaggedData contianing data tagged with WellKnownTags.text

    Return Value

    The decoded String or nil if an error is encountered in the decoding process