toByte

fun toByte(): Byte

Returns element as Byte. For vector types, it will return size of the vector. For String type, it will be parsed as integer. Unsigned elements will become signed (with possible overflow). Float elements will be casted to Byte.

Return

Byte or 0 if fail to convert element to integer.