There is no library for it.
It's included in the Core library that is always ticked as default.
Try writing something like in this image and you will find it in the suggestions.
I used "sb" as StringBuilder abbreviation, but you can declare the variable with any name you like of course.
Equivalent Core function Regex.Split works fine:
(plus note that you don't need to specify array size eg what would happen for MyTargetMoney "1.2.3" ? )
B4X:
Dim MyTargetMoney As String="1234.75"
If MyTargetMoney.Contains(".") Then
'''Dim arrNum(2) As String =sf.Split(MyTargetMoney,".")
Dim arrNum() As String = Regex.Split("\.", MyTargetMoney)
'// บาท
strBaht =arrNum(0)
'// สตางค์
strStang= arrNum(1)
Log(strBaht & " บาท, " & strStang & " สตางค")
End If
Log output:
Waiting for debugger to connect...
Program stared.
1234 บาท, 75 สตางค
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.