27 lines
618 B
Plaintext
27 lines
618 B
Plaintext
' FB 1.05.0 Win64
|
|
|
|
Dim As String s1 = "abracadabra"
|
|
Dim As String s2 = "abra"
|
|
Print "First string : "; s1
|
|
Print "Second string : "; s2
|
|
Print
|
|
Print "First string begins with second string : "; CBool(s2 = Left(s1, Len(s2)))
|
|
Dim As Integer i1 = Instr(s1, s2)
|
|
Dim As Integer i2
|
|
Print "First string contains second string : ";
|
|
If i1 Then
|
|
Print "at index"; i1;
|
|
i2 = Instr(i1 + Len(s2), s1, s2)
|
|
If i2 Then
|
|
Print " and at index"; i2
|
|
Else
|
|
Print
|
|
End If
|
|
Else
|
|
Print "false";
|
|
End If
|
|
Print "First string ends with second string : "; CBool(s2 = Right(s1, Len(s2)))
|
|
Print
|
|
Print "Press any key to quit"
|
|
Sleep
|