Alexandru Mărășteanu
Alexandru Mărășteanu
I was indeed thinking this morning to leave the type as is and break backwards compatibility
> If you do, please allow functions and classes to be converted to type rather than being executed I suppose you're talking about https://github.com/alexei/sprintf.js/pull/156/files#diff-13ed28d46a5f76f4d44561850bda81bbR61
That's interesting. Will think about this.
My guess is you're looking to implement a behaviour similar to that of `console.log`, where `console.log("foo")` yields `foo` `console.log("foo", "bar")` yields `foo bar` but `console.log("%s")` yields `%s` `console.log("%s", "foo")` returns...
Like I said in my previous comment, you are looking to count the number of arguments needed by the format string, not the number of placeholders i.e. `"%1$s %1$s %1$s"`...
See also [Testling](https://ci.testling.com)
What problem does this address?
Please provide unit tests
I'm not sure I understand. Shouldn't `sprintf('%03s', '中')` return `00中`?
This is totally valid, but I don't know how to count characters properly. For this particular purpose, though, I'd suggest changing the coding style e.g. ```js case "pt": // pt-BR...