I think I get you, so padding 0´s .. if largest number expected is 1000, then you´d add 3 zeros to anything below 10, 2 to anything below 100 etc?
EDIT: Yup, did the trick:
B4X:
If pct < 10 Then pctstring = "000" & pct
If pct > 10 And pct < 100 Then pctstring = "00" & pct
If pct > 100 And pct < 1000 Then pctstring = "0" & pct
ranklist.Add (pctstring & " " & coin)
And afterwards
B4X:
Dim rankitem As String = ranklist.get(i)
If rankitem.StartsWith("000") Then rankitem = rankitem.SubString(3)
If rankitem.StartsWith("00") Then rankitem = rankitem.SubString(2)
If rankitem.StartsWith("0") Then rankitem = rankitem.SubString(1)
Log ("# " & i & " " & rankitem)