htol
htol(x)
Converts the endianness of a value from that used by the Host to Little-endian.
Examples
julia> htol(0x12345678)
0x78563412
julia> htol(0xFFFFFFFF)
0xFFFFFFFF
julia> htol(UInt64(0x0123456789ABCDEF))
0xEFCDAB8967452301
Common mistake example:
julia> htol("Hello")
ERROR: MethodError: no method matching htol(::String)
In this example, the htol
function is applied to a string which is not a valid argument type. The function expects a numeric type as input. Make sure to provide a numeric value to htol
.
See Also
bitpack, bitunpack, bswap, flipbits!, htol, hton, isbits, ltoh, ntoh, rol, rol!, ror, ror!, signbit,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.