toHexString

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun ByteArray . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)
@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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun ByteArray . toHexString (
startIndex : Int = 0 ,
endIndex : Int = size ,
format : HexFormat = HexFormat.Default
) : String

(source)
@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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun Byte . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun Short . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun Int . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun Long . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun UByte . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun UShort . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun UInt . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.

Common
JVM
JS
Native
1.9
@ExperimentalStdlibApi fun ULong . toHexString (
format : HexFormat = HexFormat.Default
) : String

(source)

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.