[gigabytes] tag now adds a space and "GB"

All your suggestions, requests and ideas for future development
Post Reply
dolausen
Posts: 1
Joined: 09 Sep 2021, 18:20

[gigabytes] tag now adds a space and "GB"

Post by dolausen »

In the Microsoft Store version (4.9.4.0), the [gigabytes] tag now appends a space and capital GB to the value.

Previously I had been using the [gigabytes]GB so that something that was 5GB would display as 5.0GB. Now with the modification, there is no way to remove the space. This is creating inconsistencies with THOUSANDS of files. Someone can create the 5.0 GB by simply using the old method of [gigabytes] GB, but there now appears no way to remove the space.
User avatar
rednoah
The Source
Posts: 20151
Joined: 16 Nov 2011, 08:59

Re: [gigabytes] tag now adds a space and "GB"

Post by rednoah »

FileBot 4.9.4 uses the new FileSize type, instead of String (older versions; formatted number with unit) or BigDecimal (recent versions; number only), for all file size bindings to simplify the more typical use cases.


:idea: If you want to use String methods, you may need to call toString() first:

Code: Select all

{ gigabytes.toString().replace(' ', '') }
:idea: You can get the numeric value like so:

Code: Select all

{ gigabytes.toFloat() }
:idea: You can get the rounded numeric value like so:

Code: Select all

{ gigabytes.round(1) }
:idea: You can generate the String value you want like so:

Code: Select all

{ gigabytes.round(1) }GB
:idea: Please read the FAQ and How to Request Help.
Post Reply