-
Aug 17th, 2016, 11:34 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] String length
I have defined a string variable:
Code:
Dim strSearchText as String
strSearchText = "Aug 16, 2016"
I thought the length of this variable would be 12 characters but when I type "Len(strSearchText)" in the Immediate window it shows the length to be 16 characters.
What am I missing?
-
Aug 17th, 2016, 12:23 PM
#2
Frenzied Member
Re: String length
Looks like you have some hidden characters in your string. When I copied your string from this post it said the length was 16. If I retype the string it says 12. If you put your cursor right before the first character of the string (in the VS editor) & press the right arrow key you will see where the hidden characters are.
-
Aug 17th, 2016, 12:48 PM
#3
Thread Starter
Hyperactive Member
Re: String length
Thanks, you're right. I copied/pasted the value ("Aug 16, 2016") from a webpage. The page must have included hidden characters. Thanks for your help and quick reply to my post
Tags for this Thread
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
|