-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ByteBuffer should have a .hexdump(format: .compact)
#2825
Labels
good first issue
Good for newcomers
kind/enhancement
Improvements to existing feature.
semver/minor
Adds new public API.
Comments
weissi
added
kind/enhancement
Improvements to existing feature.
good first issue
Good for newcomers
semver/minor
Adds new public API.
labels
Aug 5, 2024
Related to #2748 |
supersonicbyte
added a commit
to supersonicbyte/swift-nio
that referenced
this issue
Sep 1, 2024
Motivation: Resolving the following issue: apple#2825. Modifications: • Added a compact format for ByteBuffer's hexdump method Result: A new format which is analog to the `.plain` but without whitespaces.
Made a PR for this! |
supersonicbyte
added a commit
to supersonicbyte/swift-nio
that referenced
this issue
Sep 2, 2024
Motivation: Resolving the following issue: apple#2825. Modifications: • Added a compact format for ByteBuffer's hexdump method Result: A new format which is analog to the `.plain` but without whitespaces.
FranzBusch
pushed a commit
that referenced
this issue
Sep 3, 2024
Add compact formatting option to ByteBuffer's hexdump method. ### Motivation: Resolving the following issue: #2825. ### Modifications: • Added a compact format for ByteBuffer's hexdump method ### Result: A new format which is analog to the `.plain` but without whitespaces. --------- Co-authored-by: Johannes Weiss <johannesweiss@apple.com> Co-authored-by: Si Beaumont <beaumont@apple.com>
🥹 ❤️🩹 |
This issue is actually done! Thanks @natikgadzhi & @supersonicbyte |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good for newcomers
kind/enhancement
Improvements to existing feature.
semver/minor
Adds new public API.
ByteBuffer has awesome
hexdump(format: .detailed | .plain)
formats (from #2475). They're awesome and I use them all the time. But there's one format that I think is quite useful: A compact one without spaces. SoWhy is compact so important? Frequently, UNIX tools output formats that are easy to split using
cut -d' ' -f2
orawk '{ print $2 }'
orwhile read -r line prefix hex; do echo "$hex"; done
. But all these require that there's no whitespace in the hexdump.So I think we should add another format which is exactly like
.plain
but doesn't emit spaces or any other whitespace. #2475 made great groundwork here and this should be very easy to add.The text was updated successfully, but these errors were encountered: