tuweni / org.apache.tuweni.bytes / Bytes48 / fromHexStringLenient

fromHexStringLenient

open static fun fromHexStringLenient(str: CharSequence!): Bytes48! (source)

Parse a hexadecimal string into a Bytes48.

This method is lenient in that str may of an odd length, in which case it will behave exactly as if it had an additional 0 in front.

Parameters

str - CharSequence!: The hexadecimal string to parse, which may or may not start with "0x". That representation may contain less than 48 bytes, in which case the result is left padded with zeros (see #fromHexStringStrict if this is not what you want).

Exceptions

IllegalArgumentException - if str does not correspond to a valid hexadecimal representation or contains more than 48 bytes.

Return
Bytes48!: The value corresponding to str.