Alexandru Mărășteanu
Alexandru Mărășteanu
That looks like C/C++
I tried ```js s.length s.split("").length [...s].length (new TextEncoder).encode(s).length ``` with no success. If you know how to do it, I'm open to discuss.
> The following [...] doesn't work > > The following [...] returns basically the same of s.length That was my problem as well 🙂
This is a JS implementation and works inside JS limits so I don't think this is warranted. As a side note, if one's using JavaScript and is bloody serious about...
Otoh what might work would be to do away with the type casting. Then one might be able to implement their own `toFixed`, `toPrecision` etc. methods on their own special...
I updated my previous comment to make it clear that I'd **probably** agree with forcing users to pass arguments with the appropriate type.
That would be interesting. How should one specify the options? Should `sprintf` support all options, or only the locale? Also, I see the Intl API is not supported in all...
I agree that one would sometimes need to yield a locale-aware and non locale-aware number at the same time, however I wouldn't do it without Intl. And as far as...
I don't have time to fix it, sorry. If anyone thinks this is important, I would consider a PR that addressed this.