### 4.19.4 string operations

`+`
  concatenation

`<=`, `>=`, `==`, `<>`
  comparison (lexicographical with respect to the ASCII encoding)

string_expression `[` int_expression `]`
  is a character of the string; the index 1 gives the first character.

string_expression `[` int_expression`,` int_expression `]`
  is a substring, where the first argument is the start index and the second is the length of the substring, filled up with blanks if the length exceeds the total size of the string

string_expression `[` intvec_expression `]`
  is a expression list of characters from the string

Example:

      string s="abcde";
      s[2];
    ==> b
      s[3,2];
    ==> cd
      ">>"+s[1,10]+"<<";
    ==> >>abcde     <<
      s[2]="BC"; s;
    ==> aBcde
      intvec v=1,3,5;
      s=s[v]; s;
    ==> ace
      s="654321"; s=s[3..5]; s;
    ==> 432

User manual for Singular version 4-0-3, 2016, generated by texi2html.