-
Notifications
You must be signed in to change notification settings - Fork 82
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
new package Encoding
#1236
base: main
Are you sure you want to change the base?
new package Encoding
#1236
Conversation
Pull Request Test Coverage Report for Build 3948Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
ping @Yoorkin. |
buffer/buffer.mbt
Outdated
pub fn to_unchecked_string( | ||
self : T, | ||
offset~ : Int = 0, | ||
length~ : Int = self.len |
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.
We may need to avoid labelled dependency: #1231 (comment)
let bs0 = @buffer.new(size_hint=2) | ||
let (j0, j1) = if be { (0, 1) } else { (1, 0) } | ||
bs0[j0] = (hi >> 8).to_byte() | ||
bs0[j1] = hi.land(0xFF).to_byte() |
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.
Use bs0.write_byte()
instead of random access? The op_set method for buffer is weird
TODO
UTF16BE
Stream
{Lossy, Strict}Chars
from_{bytes, array}
apidecode_strict
to error-raisable function instead of justabort
.usage
see
encoding/encoding_test.mbt
.api
see
encoding/encoding.mbti
.