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

New Feature Request - optimized right/left padding %s option #100

Open
dhartford opened this issue Aug 10, 2023 · 0 comments
Open

New Feature Request - optimized right/left padding %s option #100

dhartford opened this issue Aug 10, 2023 · 0 comments

Comments

@dhartford
Copy link

dhartford commented Aug 10, 2023

Hi team,
Evaluating quicktemplate for fixed length file generation, I'm rather impressed with the speed and efficiency!

I did find, as documented, if you start using non-optimal methods (sprintf formatting) it does increase the time (in my usecase, from 20 microseconds to 30 microseconds for a random fixed length scenario, 50% increase in time).

Ask:
Similar to #8, would there be a way to create an optimized version for string padding left/right?

{%s20 or {%s-20 for example syntax.

Concerns:
If a future feature was needed to SLICE strings down to the same length (also necessary for fixed length, trimming remainder after the cutoff point), not sure how to ensure the right capabilty and syntax for right PAD v left PAD vs SLICE or the 'always' fixed length with Slice/right-Pad or slice/left-pad at the same time.

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

No branches or pull requests

1 participant