[formatter] add 'Lb' format specifier - 'L' for bytes
This commit is contained in:
@@ -293,6 +293,16 @@ Format specifiers can be used for advanced formatting by using the options provi
|
||||
<td><code>{foo:L3/long/}</code></td>
|
||||
<td><code>long</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>Lb<maxlen>/<ext>/</code></td>
|
||||
<td rowspan="2">Same as <code>L</code>, but applies to the <a href="https://docs.python.org/3/library/stdtypes.html#bytes"><code>bytes()</code></a> representation of a string in <a href="https://docs.python.org/3/library/sys.html#sys.getfilesystemencoding">filesystem encoding</a></td>
|
||||
<td><code>{foo_ja:Lb15/長い/}</code></td>
|
||||
<td><code>フー・バー</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>{foo_ja:Lb8/長い/}</code></td>
|
||||
<td><code>長い</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>X<maxlen>/<ext>/</code></td>
|
||||
<td rowspan="2">Limit output to <code><maxlen></code> characters. Cut output and add <code><ext></code> to its end if its length exceeds <code><maxlen></code></td>
|
||||
|
||||
Reference in New Issue
Block a user