这个问题与这个问题有关,关于在 Delphi 应用程序中自动使用一些 Windows 资源管理器功能。
有没有办法在 Delphi 中自动使用 metrix 前缀格式化整数?以某种方式自动获得 Windows 资源管理器给出的结果?我的意思是自动将 1024 转换为 1.0 K。
让我们说类似
FormatMetric('FileSize = %d', [26112], 1,'B')
// where the third parameter is the number of decimal digits
// and the fourth is the string that is appended
将返回
25.5 KB
当然我可以编写这个代码,但是在 RTL 中有这样的东西吗?