Skip to content

string(__)

MarcoDotIO edited this page Apr 25, 2023 · 1 revision

string(_:)

Deserialize a string from the Deserializer's input data buffer.

public static func string(_ deserializer: Deserializer) throws -> String 

This function first calls Deserializer.toBytes(_:) to read the raw bytes for the string. Then, it attempts to convert the bytes into a String using the UTF-8 encoding.

Parameters

  • deserializer: The Deserializer instance to deserialize the string from.

Throws

AptosError.stringToDataFailure if the UTF-8 decoding fails.

Returns

A decoded String from the input data buffer.

Types
Protocols
Global Variables
Global Functions
Extensions
Clone this wiki locally