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

Support field width for floats #17

Open
Ockenfuss opened this issue Jul 14, 2021 · 1 comment
Open

Support field width for floats #17

Ockenfuss opened this issue Jul 14, 2021 · 1 comment

Comments

@Ockenfuss
Copy link

Hello everyone,

first of all, thank you for this awesome tool!
However, I am missing the possibility to specify the field width for floating point format specifiers, like e.g. %5f.
C's scanf functions support such a feature. From the scanf manpage on my system: "An optional decimal integer which specifies the maximum field width. Reading of characters stops either when this maximum is reached or when a nonmatching character is found, whichever happens first."

Unfortunately, I am not experienced enough with regular expressions to include this feature into scanf_translate myself. I opened a question on Stackoverflow concerning this feature. Any help is appreciated!

Thank you very much

@joshburnett
Copy link
Owner

Thanks for your interest! Unfortunately, I am also not enough of a regex master to know how to do the field width limiting. If anyone has a solution, PRs are certainly welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants