Reputation: 627
This is frustrating me. I have a String that has two pilcrows in it. It looks like I can't put pilcrows in here so here is an image of it:
How can I parse out the pilcrows from the String named, NameOfUser? I have tried:
NameOfUser.IndexOf(Chr(182))
But that doesn't work, returns a -1. I have also tried copying and pasting the pilcrow to pass that as the parameter, but it wouldn't allow that character in Visual Studio. So I'm at a loss here, if anyone could help me out. I feel it has to be a simple syntax thing that I'm missing.
thanks, Justin
Upvotes: 2
Views: 606
Reputation: 149050
You can just copy-paste the pilcrow. This works for me:
NameOfUser.IndexOf("¶"c)
Or use the ChrW
function:
NameOfUser.IndexOf(ChrW(182))
Upvotes: 0
Reputation: 35440
Try using ALT + 0182
right within the string value in Visual Studio code editor. See if this makes a difference. Also check the integer Unicode value of the character at the particular index.
Upvotes: 2