Initializer

init(from:)

Creates a string from another string wrapped in a data value.

Declaration

init?(from dataValue: MLDataValue)

Discussion

Use this initializer to create a string by converting an MLDataValue with an underlying type of String. You can confirm the data value’s underlying type by retrieving a non-nil value from stringValue or by inspecting the type property.

Relationships

See Also

Using a String as a Data Value

var dataValue: MLDataValue

The string wrapped in a data value.

static var dataValueType: MLDataValue.ValueType

The underlying type a string uses when it wraps itself in a data value.