On Saturday, 16 February 2019 18:16:07 UTC+10, Jeremy Ruston wrote:
 

> I've no objection to adding a padding operator. I think we should support 
> padding with any character, not just zeros, and somehow should support both 
> left and right padding.
>
> A generic padding function implemented as a filter operator presents some 
challenges to pass in the necessary arguments: padded width, left or right 
padding, padding character.  Maybe, as an alternative we could have a 
format filter operator that uses something similar to the Python string 
format function, so we could have:

   - ...format[":<06d"] number - left align - right padded with "0".
   - ...format[":>06d"] number - right align - left padded with "0"
   - ...format[":>10s"] string right aligned - padded with spaces.
   - ...format[":>_10s"] string right aligned - padded with "_".
   - etc.

Given that our numbers are already strings, we may not really need "d" or 
"s" and just default to string type.

I would be interested in any other suggestions.

Mal


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b028d798-5ab6-4722-9622-fae17d540c6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to