sprintf.js
sprintf.js copied to clipboard
[Feature Request] support pure bytes format?
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?
I'm not sure I understand. Shouldn't sprintf('%03s', '中') return 00中?