So the example on
aqString.Find article is wrong (or I understood it wrong)...
It says that "
If the substring was found, the method returns the number of the first matching character, otherwise, it returns -1."
As my example is returning "-1" it means that the word "sucesso" wasn't found, or it means that it was found?!
Sub StringOccurrenceDemo
Dim aString, aSubString, Res
aString = "Per aspera ad astra"
aSubString = "astra"
Res = aqString.Find(aString, aSubString)
If Res <> -1 Then
Log.Message("Substring '" & aSubString & "' was found in string '" & aString & "' at position " & Res)
Else
Log.Message("There are no occurrences of '" & aSubString & "' in '" & aString & "'")
End If
End Sub
If I got that wrong, I'll need to practice my english!! ;(
Thanks Robert.