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
Add a new padding template format option #5890
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to extend (or create) a msautotest for this
@rouault - many thanks for the review and explanations. I'll try and find an autotest for templates to add this to (also I'll update docs if this pull request is accepted). |
I think I’d just ignore the value. Is this for only padding on the right? What about supporting padding on the left or both? A negative number would be convenient for left padding, no idea on both. You’d almost need a second attribute, padding direction… Then again I don’t understand the use case very well.
|
@sdlime - the main use case is to allow for creation of RST tables which rely on fixed width strings. I've no current use case for left padding though. |
Champaign ! |
See #5889 - adds a new "padding" format option for fixed length strings in a template.
Online testing in REPL at https://repl.it/repls/LeftSlimQuotient
Reviews of C code welcome, especially if variable declarations should be moved, and everything is created and freed correctly.