We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
C language docs says the following about .precision field in sprintf() format:
.precision
sprintf()
If the period is specified without an explicit value for precision, 0 is assumed.
But Fengari raises error instead of assuming zero:
> print(("%.0f"):format(42.5)) 43 > print(("%.f"):format(42.5)) SyntaxError: [sprintf] unexpected placeholder
The text was updated successfully, but these errors were encountered:
fengari uses the sprintf-js npm package for string formatting. Can you replicate the issue with that?
Sorry, something went wrong.
Can you replicate the issue with that?
Yep:
$ node > require("sprintf-js").sprintf("%.f", 2) Thrown: SyntaxError: [sprintf] unexpected placeholder > require("sprintf-js").sprintf("%.0f", 2) '2'
Filed alexei/sprintf.js#181
[sprintf] unexpected placeholder
No branches or pull requests
C language docs says the following about
.precision
field insprintf()
format:But Fengari raises error instead of assuming zero:
The text was updated successfully, but these errors were encountered: