How to determine if the "L" character is the string?

In my program, I just need to know if there is an "L" in the string--or not.
Who is Participating?
Fernando SotoConnect With a Mentor RetiredCommented:
Try the Contains method something like this.

Dim s = "the string has a L in it"
If s.Contains("L") Then
    '' it has an L
End If
slightwv (䄆 Netminder)Connect With a Mentor Commented:
Most languages have an INSTR function.

VB is one of them:
Ryan ChongConnect With a Mentor Commented:
or try use IndexOf function:
Dim Str As String = "Hello World"
        Dim isFound As Boolean = (Str.IndexOf("L") > 0)
        MessageBox.Show("isFound = " + isFound.ToString())

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.