Skip to content

How do "alternatives" in format strings work? #1973

Answered by mikf
JessiAuro asked this question in Q&A
Discussion options

You must be logged in to vote

"Alternatives" only work for the data selection portion, i.e. Field Names. The format specifiers have to be shared among all possible fields.

{hash|num:>04} should work here, since zero-filling the hash value until it is 4 characters long is a noop.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mikf
Comment options

mikf Oct 23, 2021
Maintainer

@JessiAuro
Comment options

@mikf
Comment options

mikf Oct 23, 2021
Maintainer

@JessiAuro
Comment options

@JessiAuro
Comment options

Answer selected by JessiAuro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants