Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function tidyByteAr(ByVal input As Byte(), Optional ByVal length As Integer = 32) As Byte()
- Dim rawData() As Byte = input
- Dim empty() As Byte : empty = New Byte(length) {}
- Dim i As Integer
- For i = 0 To rawData.Length - 1 Step 1
- empty(i) = rawData(i)
- If rawData(i) = &H0 Then : Exit For : End If
- Next
- For i = i To empty.Length - 1 Step 1 : empty(i) = 0 : Next
- Return empty
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement