|
|
Joined: Dec 1999
Posts: 30,867
Master Elite Member
|
Public Function AsString_ByteArray(ByteArray() As Byte) As String
'Purpose
' Used to convert a byte array to a string.
'Parameters
' ByteArray (Byte()) = The byte array to convert.
'Return (String)
' Returns the specified byte array as a string.
' If the specified byte array has no elements, the returned string is zero-length.
'Dependencies
' ElementCount
'Version History
' 1.0 4/25/2004 Tested by Russ Tanner
'---
'Initiate variables
Dim C As Long 'Loop counter
Dim R As String 'Return buffer
'Main loop
For C = 0 To ElementCount(ByteArray) - 1
R = R & Chr(ByteArray(C))
Next C
'Return the result
AsString_ByteArray = R
End Function
|
|
|
|
|