else If checkfornumber(o) Then
#if B4a
Private n As Int = o
#else if B4I
Private n As Double = o
#End If
s = s & prevprefix & su.EncodeUrl(actprefix & "["&ky & "]","UTF8")&"="& NumberFormat2(n,0,0,0,False)
Else
in the function convertsubmaptoUrlEncode in StripeClass
The java version isn't relevant.
This is not a bug as 1000.0 meets the set minimum and maximum values.
Best to use B4XFormatter. It will work exactly the same in all platforms:
B4X:
Dim f As B4XFormatter
f.Initialize
f.GetDefaultFormat.MaximumFractions = 2
f.GetDefaultFormat.MinimumFractions = 0
f.GetDefaultFormat.GroupingCharacter = ""
Log(f.Format(n))
I would expect, that for 1000 with MiniumFraction = 0, the result beeing 1000 and not 1000.0.
And why not 1000.00 which respects also the requirements?
I would expect, that for 1000 with MiniumFraction = 0, the result beeing 1000 and not 1000.0.
And why not 1000.00 which respects also the requirements?
This happens in the native API. I guess that the default string representation of 1000 is 1000.0 and it doesn't modify it if it meets the requirements.
Anyway, as written in post #2, on my device it displays OK.
I tested with n = 1000.001 and the display is 1000, as expected by me.
So am astonished that it is wrong for Andrew.