A Arya8867 Member Oct 29, 2019 #1 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: Oct 29, 2019
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?
Erel B4X founder Staff member Licensed User Longtime User Oct 29, 2019 #2 You have posted this question in B4R forum. Are you asking about B4A or B4R? Upvote 0
A Arya8867 Member Oct 29, 2019 #3 Erel said: You have posted this question in B4R forum. Are you asking about B4A or B4R? Click to expand... Sorry, my mistake i ask about B4R i found this way: Code: Copy 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 Upvote 0
Erel said: You have posted this question in B4R forum. Are you asking about B4A or B4R? Click to expand... Sorry, my mistake i ask about B4R i found this way: Code: Copy 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