Question Search for strings by its partial name?

MisterWhite

New member
Joined
Sep 14, 2015
Messages
3
Programming Experience
Beginner
So i'm doing some practice exercises and i came across the issue. Lets say we have entered a string : "My name is Tod", "My life is hard", "Do you even lift bruh?". so what i'm asking is what kind of code should it be so that if i type "Tod" in my "search"
it would find that string?
 
The String class includes Contains, StartsWith, EndsWith and IndexOf methods that may be helpful. The first is case-sensitive only while the other three can be case-insensitive if desired.
 

Latest posts

Back
Top Bottom