Jump to content

Hex dump: Difference between revisions

m
m (→‎{{header|Julia}}: adjust display with specified length argument)
Line 490:
<syntaxhighlight lang="julia">function baseddump(io::IO, data::Vector{UInt8}; base = 16, offset = 0, len = -1, displayadjust = 0)
@assert 2 <= base <= 16 "display base $base not supported"
datastop = len < 0 ? length(data) : min(offset + len - 1, length(data))
bytes = data[begin+offset:datastop]
fullchunksize = base == 16 ? 16 : base > 8 ? 10 : base > 4 ? 8 : 6
4,108

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.