Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ Delphi FoxPro Java Perl Python 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> |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.