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

[Feature Request] support pure bytes format? #174

Open
skygragon opened this issue Nov 25, 2018 · 1 comment
Open

[Feature Request] support pure bytes format? #174

skygragon opened this issue Nov 25, 2018 · 1 comment

Comments

@skygragon
Copy link

now '%s' uses character's length (instead of bytes) in rendering fixed length format, here is an example:

> sprintf('%03s', 1)
'001'
> sprintf('%03s', '中')
'00中'

maybe we could add '%B' to render pure bytes?

@alexei
Copy link
Owner

alexei commented Nov 26, 2018

I'm not sure I understand. Shouldn't sprintf('%03s', '中') return 00中?

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

No branches or pull requests

2 participants