|
-
Jun 19th, 2002, 03:23 PM
#1
Thread Starter
Hyperactive Member
InStr function...
Does anybody know if there's a function like "InStr" as it is
in VB or VB.NET?
thx!
-
Jun 19th, 2002, 06:31 PM
#2
I'd start out looking in the System.String class first. If you don't figure it out by the time my other comp is put back togeather I post a sample. I don't have any of my code on this pc.
-
Jun 20th, 2002, 08:40 AM
#3
sont know if this is the correct syntax, but it should be
string yourstring = "Apple";
int instringnumber = yourstring.IndexOf("A");
IndexOf is the correct method, just dont know if the the parameter is correct, but it should be that.
You also have LastIndexOf which will get the index of the the last occurance. FYI
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
|