S is S1 + S2 strings concatenation

R is str_length(S) finds the length of the given string

equal(S1, S2) compares strings with case (the same as ** =:=**
)

equal(S1, S2, no_case) compares strings (with no case)

less_than(S1, S2) compares strings with case (the same as

less_than(S1, S2, no_case) compares strings (with no case)

For comparing strings you can use also the arithmetic compare predicates.
For them look at Comparison