B4R Question String to Number

Discussion in 'B4R Questions' started by Arya8867, Oct 29, 2019.

  1. Arya8867

    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: Oct 29, 2019
  2. Erel

    Erel Administrator Staff Member Licensed User

    You have posted this question in B4R forum. Are you asking about B4A or B4R?
     
  3. Arya8867

    Arya8867 Member

    Sorry, my mistake
    i ask about B4R
    i found this way:
    Code:
    Dim port As UInt = BC.StringFromBytes("12345")
        
    Log(port)
        
    Dim IP(4As 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
     
    Erel likes this.
Loading...
  1. 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.
    Dismiss Notice