B4R Question String to Number

Arya8867

Member
Hi
how we can convert a string to number in B4R?
for example i want to convert the string "192.168.24.1" to array of byte?
or convert "14235" to UINT?
 
Last edited:

Arya8867

Member
You have posted this question in B4R forum. Are you asking about B4A or B4R?
Sorry, my mistake
i ask about B4R
i found this way:
B4X:
Dim port As UInt = BC.StringFromBytes("12345")
    Log(port)
    Dim IP(4) As Byte
    Dim i As Byte = 0
    For Each t() As Byte In BC.Split("192.168.1.1",".")
        IP(i)=BC.StringFromBytes(t)
        'IP(i) = BC.g
        Log(IP(i))
        i = i+1
    Next
 
Top