Add a new padding template format option#5890
Conversation
rouault
left a comment
There was a problem hiding this comment.
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.