Skip to content
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

Implement byteLength method. #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

reklatsmasters
Copy link

This PR implements byteLength method. API is the same as in Buffer.byteLength.

@ashtuchkin
Copy link
Owner

Interesting, is it much faster than iconv.encode(..).length? What's the use case here?

@reklatsmasters
Copy link
Author

@ashtuchkin It's faster for internal and single-byte encodings. The use cases are the same as for Buffer.byteLength - if you want to known size of string in bytes before encoding.

@ashtuchkin
Copy link
Owner

ashtuchkin commented Jul 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants