-
Notifications
You must be signed in to change notification settings - Fork 64
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
Stringify Bytes #1860
Stringify Bytes #1860
Conversation
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
end | ||
|
||
# Trims off the whitespaces at the beginning and the end of `self` | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you define whitespace (it can be ambiguous)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"# NOTE: A whitespace is defined here as a byte whose value is <= 0x20" added
There is a lot of things (and lot of clones) but I have no better proposal, so +1 but I will wait for other reviewers. |
02c9e92
to
91200b2
Compare
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
…Bytes` Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
91200b2
to
fd67956
Compare
This PR adds some String-like functions to Bytes, along with an abstraction for Byte-based patterns. Also, a bug was found within `Bytes::is_empty` and `FlatText` is now public since there was no real rationale to keep it private Pull-Request: #1860 Reviewed-by: Jean Privat <jean@pryen.org>
I'm still not convinced that replicating the String API on bytes is a good idea. My two cents is that there should be a default transformation between But you're the expert and this will be useful so +1. |
This PR adds some String-like functions to Bytes, along with an abstraction for Byte-based patterns. Also, a bug was found within `Bytes::is_empty` and `FlatText` is now public since there was no real rationale to keep it private Pull-Request: #1860 Reviewed-by: Jean Privat <jean@pryen.org> Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
This PR adds some String-like functions to Bytes, along with an abstraction for Byte-based patterns.
Also, a bug was found within
Bytes::is_empty
andFlatText
is now public since there was no real rationale to keep it private