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

printf %d pads with spaces instead of zeros with precision specifier #4873

Closed
p6rt opened this issue Dec 15, 2015 · 4 comments
Closed

printf %d pads with spaces instead of zeros with precision specifier #4873

p6rt opened this issue Dec 15, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 15, 2015

Migrated from rt.perl.org#126923 (status was 'resolved')

Searchable as RT126923$

@p6rt
Copy link
Author

p6rt commented Dec 15, 2015

From @skids

When the %d directive is given a decimal precision it should pad with zeroes, not spaces.

$ perl6 -e 'printf("%3.3d", 16)'
16
$ perl -e 'printf("%3.3d\n", 16)'
016

@p6rt
Copy link
Author

p6rt commented Jul 10, 2017

From @dogbert17

On Tue, 15 Dec 2015 06​:14​:03 -0800, bri@​abrij.org wrote​:

When the %d directive is given a decimal precision it should pad with
zeroes, not spaces.

$ perl6 -e 'printf("%3.3d", 16)'
16
$ perl -e 'printf("%3.3d\n", 16)'
016

This was fixed with rakudo/rakudo@a1c7d01.
Tests were added to t/spec/S32-str/sprintf.t, closing issue.

@p6rt
Copy link
Author

p6rt commented Jul 10, 2017

The RT System itself - Status changed from 'new' to 'open'

@p6rt p6rt closed this as completed Jul 10, 2017
@p6rt
Copy link
Author

p6rt commented Jul 10, 2017

@dogbert17 - Status changed from 'open' to 'resolved'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant