fixed panic when using mutators on floats

This commit is contained in:
Timon Ringwald
2022-04-18 20:39:41 +02:00
parent d733246517
commit f66d9d7f3b
2 changed files with 50 additions and 4 deletions

View File

@ -204,6 +204,26 @@ day: 2 | month: 1 | year: 2006
day: 2 | month: 2 | year: 1962
```
### Adding 2 values together
Input:
```
5 7
3 2
10 152
-15 3.7
```
Command: `format -i '(-?\d+) (-?\d+(?:.\d+)?)' -o '{1} + {2} = {1:%.2f:+(2)}'`
Output:
```
5 + 7 = 12.00
3 + 2 = 5.00
10 + 152 = 162.00
-15 + 3.7 = -11.30
```
### Bulk renaming files
Rename a bunch of files using format at once