Android Question NumberFormat Question

imbault

Well-Known Member
Licensed User
Longtime User
Hi,
Normal behavior is
Log(NumberFormat(10, 4 ,0)) '"0010"

I would like to get " 10", in fact space instead of 0 at the beg of string, is there a easy way, or do I have to write a small sub like
B4X:
        Dim cNum As String
        cNum = NumberFormat(10, 4 ,0)
        Do While cNum.StartsWith("0")
            cNum = " " & cNum.SubString(1)
        Loop

Thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…