Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
|
|
Convert Byte Array to String FunctionASP function to convert a byte array to string. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% ' ' Byte array to string conversion function: Function ByteArrayToString(x) Dim i, s For i = 1 To LenB(x) s = s & Chr(AscB(MidB(x, i, 1))) Next ByteArrayToString = s End Function ' Create a byte array with the us-ascii values for "ABCDEFG" ' 65,66,67,68,69,70,71 Dim a a = a & ChrB(65) a = a & ChrB(66) a = a & ChrB(67) a = a & ChrB(68) a = a & ChrB(69) a = a & ChrB(70) a = a & ChrB(71) ' Convert the byte array to a string: Dim s s = ByteArrayToString(a) ' Display the string: Response.Write s %> </body> </html> |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.