up previous next

Substrings

If L is a string and N is an integer, then L[N] is the N-th character of L.

example

    
L := "hello world";
L[2];
e
-------------------------------
        
    
The operator IsIn can be used to test if one string is a substring of another.

example

    
L := "hello world";
"hello" IsIn L;     -- one may also write IsIn("hello",L)
TRUE
-------------------------------