|
-
May 20th, 2013, 06:38 PM
#1
Thread Starter
Hyperactive Member
How to remove null from fixed length string
There is a fixed length string which has 3 null char.
I want to concatenate other string to this string but failed because 3 nulls.
How can I do this?
Here is sample code.
Dim str1 As String * 10
Dim str2 As String
str1 = "ABCDEFG" & Chr(0) & Chr(0) & Chr(0)
str2 = str1 + "HIJ"
MsgBox str2 'str2 is ""ABCDEFG" not "ABCDEFGHIJ"
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
|