Hello All,
I required to get the last two digit of any value.
Like :
Degree=3051
I want 51 only.
How Do I cut and get the value of 51? I am able to get each digit of 3051 , but not the last two digit.
Below is the code:
Thanks-
Pokhraj
I required to get the last two digit of any value.
Like :
Degree=3051
I want 51 only.
How Do I cut and get the value of 51? I am able to get each digit of 3051 , but not the last two digit.
Below is the code:
B4X:
Public Serial1 As Serial
Private b() As Byte="3051"
Private bc As ByteConverter
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
Dim i As Int=0
For i = 0 To b.Length-1
Dim c() As Byte=bc.SubString2(b,i,i+1)
Log(c)
Next
End Sub
Thanks-
Pokhraj