You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/data/help_format.txt
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,10 @@ In 2.23.0 or newer, `<` or `>` can be specified instead of `:` to set a left or
17
17
For example: "--title-format '{user-name<20}'" will generate `<user-name> `;
18
18
"--title-format '{user-name>20}'" will generate ` <user-name>`
19
19
20
+
In 2.24.0 or newer, `{~startIndex,endIndex}` can be specified to slice a string. Negative index counts back from the end of the string.
21
+
If an index is omitted, 0 is used. For example, both `{~,0}` `{~0,}` and `{~,}` are same as `{~0,0}` and will always generate a empty string.
22
+
If `,endIndex` is omitted or greater than the length of the string, the length of string is used.
23
+
20
24
If the value index is missing, meaning the placeholder is "{}", an internal counter sets the value index.
21
25
This means that the format string "Values: {1} ({2})" is equivalent to "Values: {} ({})".
22
26
Note that this counter only counts empty placeholders, so the format string "{2} {} {}" will contain the second value, then the first, and then the second again.
0 commit comments