toHexString
@ExperimentalStdlibApi @ExperimentalUnsignedTypes fun UByteArray.toHexString(
format: HexFormat = HexFormat.Default
): String
(source)
Formats bytes in this array using the specified format.
Note that only HexFormat.upperCase and HexFormat.BytesHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Exceptions
IllegalArgumentException
- if the result length is more than String maximum capacity.
@ExperimentalStdlibApi @ExperimentalUnsignedTypes fun UByteArray.toHexString(
startIndex: Int = 0,
endIndex: Int = size,
format: HexFormat = HexFormat.Default
): String
(source)
Formats bytes in this array using the specified HexFormat.
Note that only HexFormat.upperCase and HexFormat.BytesHexFormat affect formatting.
Parameters
startIndex
- the beginning (inclusive) of the subrange to format, 0 by default.
endIndex
- the end (exclusive) of the subrange to format, size of this array by default.
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Exceptions
IndexOutOfBoundsException
- when startIndex or endIndex is out of range of this array indices.
IllegalArgumentException
- when startIndex > endIndex
.
IllegalArgumentException
- if the result length is more than String maximum capacity.
Formats this Byte
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Formats this Short
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Formats this Int
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Formats this Long
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Formats this UByte
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Formats this UShort
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Formats this UInt
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.
Formats this ULong
value using the specified format.
Note that only HexFormat.upperCase and HexFormat.NumberHexFormat affect formatting.
Parameters
format
- the HexFormat to use for formatting, HexFormat.Default by default.