function
hex
hex[type: DType](value: SIMD[type, 1], prefix: StringLiteral = "0x", /) -> String
Returns the hex string representation of the given integer.
The hexadecimal representation is a base-16 encoding of the integer value.
The returned string will be prefixed with "0x" to indicate that the subsequent digits are hex.
Parameters:
- type (
DType
): The type of the Scalar to represent in hexadecimal.
Args:
- value (
SIMD[type, 1]
): The integer value to format. - prefix (
StringLiteral
): The prefix of the formatted int.
Returns:
A string containing the hex representation of the given integer.
hex[T: Indexer](value: T, prefix: StringLiteral = "0x", /) -> String
Returns the hex string representation of the given integer.
The hexadecimal representation is a base-16 encoding of the integer value.
The returned string will be prefixed with "0x" to indicate that the subsequent digits are hex.
Parameters:
- T (
Indexer
): The indexer type to represent in hexadecimal.
Args:
- value (
T
): The integer value to format. - prefix (
StringLiteral
): The prefix of the formatted int.
Returns:
A string containing the hex representation of the given integer.
hex(value: SIMD[bool, 1], prefix: StringLiteral = "0x", /) -> String
Returns the hex string representation of the given scalar bool.
The hexadecimal representation is a base-16 encoding of the bool.
The returned string will be prefixed with "0x" to indicate that the subsequent digits are hex.
Args:
- value (
SIMD[bool, 1]
): The bool value to format. - prefix (
StringLiteral
): The prefix of the formatted int.
Returns:
A string containing the hex representation of the given bool.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
If you'd like to share more information, please report an issue on GitHub
😔 What went wrong?