hexDump(format:)

    Returns a hex dump of this ByteBuffer in a preferred HexDumpFormat.

    ByteBuffer-hexdump.swift:319
    func hexDump(format: HexDumpFormat) -> String

    Parameters

    format

    HexDumpFormat to use for the dump.

    hexDump provides four formats: - .plain — plain hex dump format with hex bytes separated by spaces, i.e. 48 65 6c 6c 6f for Hello. This format is compatible with xxd -r. - .plain(maxBytes: Int) — like .plain, but clipped to maximum bytes dumped. - .compact — plain hexd dump without whitespaces. - .compact(maxBytes: Int) — like .compact, but clipped to maximum bytes dumped. - .detailed — detailed hex dump format with both hex, and ASCII representation of the bytes. This format is compatible with what hexdump -C outputs. - .detailed(maxBytes: Int) — like .detailed, but clipped to maximum bytes dumped.

    Other members in extension

    Types

    Typealiases

    Show implementation details (2)

    Hide implementation details

    Type members

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces