-
Notifications
You must be signed in to change notification settings - Fork 15
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
string formatting - truncate, pad left and pad right #23
Comments
I'm ok with the idea. Is there some standart directed by printf relative to right padding ? |
@wdavidw the spec does cover padding: http://www.cplusplus.com/reference/cstdio/printf/ Having said that, from example above, I couldn't understand what would |
The C standard docs I have seen are a bit vague about how some features like precision apply to strings. Using Apple's clang/LLVM, not sure whose runtime, gnu maybe:
I get:
The only places my suggestion differs are I think I suggested uppercase For reference:
produces:
|
Any suggestion on this issue ? |
@wdavidw If you meant me, sorry I'm completely out of touch with this issue; this library is working fine for my needs currently, I'm using it daily, all is fine. Thank you for great work, I should have written it myself if you haven't created it because I have to deliver code in both Nunjucks (Node) and Jinja (Python) and "out-of-box", this filter is missing outside Python. Thank you! |
It would be very useful to be able to truncate strings to a certain length and also pad left and right, currently only padding left appears to be supported. maybe upper case S could support traditional extended string formatting like
I would consider creating a patch request if the idea is palatable
The text was updated successfully, but these errors were encountered: