Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function ToInteger(ByVal Buffer As Byte Ptr, ByVal DigitCount As Integer)As Integer
- Dim intResult As Integer
- Dim flag As Integer
- If Buffer[0] = 45 Then
- flag = 1
- End If
- For i As Integer = flag * SizeOf(WString) To DigitCount * SizeOf(WString) - SizeOf(WString) Step SizeOf(WString)
- intResult *= 10
- intResult += Buffer[i] - 48
- Next
- If flag Then
- intResult *= -1
- End If
- Return intResult
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement