String Operators
The following operators can be applied to any values of the type string.
General Form | Meaning / Remarks |
---|---|
s1 + s2 |
concatenate Concatenate means to splice two string values together, resulting in a new, composite string value. For example, 'Hello, ' + 'everyone!' results in the same string value as 'Hello, everyone!' |
s + any any + s |
concatenate Concatenation also works between a string value and a non-string value. The non-string value is converted to its equivalent string representation, which is then concatenated to the string value. For example, if the variable angle contains the numeric value 75.4, then 'The result is' + angle results in the same string value as 'The result is 75.4' |
s1 < s2 s1 > s2 s1 <= s2 s1 >= s2 |
test for relative order Determines how one string value relates to another, resulting in a bool value. The result is true if the comparison is successful, otherwise it's false. |