|
-
Jan 21st, 2000, 02:44 AM
#1
Private Sub Command1_Click()
Dim qwe() As Byte, asd As String
asd = "asd"
qwe = StrConv(asd, vbFromUnicode)
End Sub
so I got qwe(0) = 97
qwe(1) = 115
qwe(2) = 100
how can i do to have my string "asd" back from qwe() without looping
is there a function like strConv doing it or an API call ?
-
Jan 21st, 2000, 02:45 AM
#2
Hyperactive Member
Huh? What do you mean "have it back"?
------------------
Ryan
[This message has been edited by Gimpster (edited 01-21-2000).]
-
Jan 21st, 2000, 03:09 AM
#3
I mean a function which would return "asd" based on the bytes of the qwe array
qwe = StrConv(asd,vbfromunicode) returns an
array of ascii numbers; is there a function returning a string based on an array of ascii numbers (0-255)
thank you
-
Jan 21st, 2000, 03:13 AM
#4
Hyperactive Member
I know you can use Chr() to find the letter given the Ascii code, however I do not know if it would work for an entire string of Ascii codes. You can try it. How does StrConv return the Ascii codes? Maybe you could break them up and run each one through the Chr() function.
------------------
Ryan
-
Jan 21st, 2000, 03:14 AM
#5
Pass the Byte Array without the Parenthesis to treat it as a String, ie.
Code:
Private Sub Command1_Click()
Dim sBytes() As Byte
Dim sString As String
sBytes = StrConv("asd", vbFromUnicode)
sString = StrConv(sBytes, vbUnicode)
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|