Contains string

I’m confused with the change in API 2.0
I need to search if a string is contained inside an URL.
URL = “https://myexampleofanurl.com
How to detect if “url.com” is inside URL string. Tried IndexOf, InStr. No luck
I just want true or false

Use IndexOf >= 0 then you have true or false boolean result

tHanks, found this example
http://man.hubwiz.com/docset/Xojo.docset/Contents/Resources/Documents/docs.xojo.com/String-19.html

Xojo 2022r2+:

Var URL As String = "https://myexampleofanurl.com"

If URL.Contains("url.com") Then
  Break
End If
1 Like