Android Question How to parse String to Integer?

DonManfred

Expert
Licensed User
Longtime User
If you try to sum from extract a list
get error
You should create a new thread for your problem posting the relevant code and the complete error message! Or better: Upload a small project which shows the problem! FOR SURE in the new thread....
 
Upvote 0

victormedranop

Well-Known Member
Licensed User
Longtime User
I used this function, maybe is not the more elegant way to do it. But works like a charm for me.

B4X:
Sub Parse_int(s As String) As Int
 Dim amount As Int
 amount = s.Replace(",","")
 Return amount
End Sub
 
Upvote 0
Top