CyberiaPC.com Community Forums Main Page
RSS Feeds: Late(st) News | Zenith Picture Gallery | Most Recent Community Topics | Tips, Tricks and Other Useful Stuff

Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> Alogorithms
Guest_Julie_*
post Nov 25 2003, 01:24 PM
Post #1





Guests







:'( given 2 strings of characters, how can you test whether the first string appears as a substring somewhere in the second, what are you supposed to do here?
Go to the top of the page
 
+Quote Post
keno
post Nov 26 2003, 04:03 PM
Post #2


Active Member
Group Icon

Group: Support Team
Posts: 160
Joined: 3-January 03
From: Colorado
Member No.: 353

United States




You could use IndexOf

string1 = ob
string2 = bob

CODE
int ImFound = string2.IndexOf(string1);


ImFound would return -1 if it wasn't found, or the index value if it was
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th June 2013 - 11:27 PM