I have double like 6.123456
Next part of code always returns 3 fractions.
B4X:
Dim ff As B4XFormatter
ff.Initialize
Dim DefaultFormat As B4XFormatData = ff.GetDefaultFormat
DefaultFormat.MaximumFractions = 6
DefaultFormat.MinimumFractions = 2
Dim kzd_s As String = ff.Format(kzd)
Dim ff As B4XFormatter
ff.Initialize
Dim DefaultFormat As B4XFormatData = ff.GetDefaultFormat
DefaultFormat.MaximumFractions = 6
DefaultFormat.MinimumFractions = 2
Dim kzd_s As String = ff.Format(6.123456)
Log(kzd_s)
Or if you want 3 fractions (aka decimal places?) then... ask, and ye shall receive:
B4X:
Dim ff As B4XFormatter
ff.Initialize
Dim DefaultFormat As B4XFormatData = ff.GetDefaultFormat
DefaultFormat.MaximumFractions = 3
DefaultFormat.MinimumFractions = 3
Dim kzd_s As String = ff.Format(6.123456)
Log(kzd_s)