Skip to content

Make ByteBuffer.description useful and pretty #2863

Closed
@weissi

Description

@weissi

Right now, ByteBuffer's description is ugly and not very useful (doesn't print the bytes). With #2856 being merged, I'm proposing to make ByteBuffer's description the following:

[ hex bytes, maximum 64 or something ](length bytes)

so hello world would be

[68656c6c6f20776f726c64](11 bytes)

and 256 0 bytes would be

[00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000](256 bytes)

the empty string would be [](0 bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerssize/SSmall task. (A couple of hours of work.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions