String literal

A string can be constructed from string literal, which is a block of text delimited with quotes "". A string literal can have unicode characters. To write a quote inside string, a double quote "" is used.

Strings can be concatenated with & operator.

To add a new line to a string, use LF. For other special characters see char

Example
main
  string s1 = "Hello,"
  string s2 = """World""!"     
  
  print s1 & " " & s2         // Prints "Hello, "World"!"
  print s1 & LF & s2          // Prints "Hello,
                              // "World"!"

Member method get size is used to find the length of a string.

Reference operator <string>[<int>] is used to access the character at a specified index.

Example
main
  
  string s = "hello world"
  
  int n = s.get size - 1
  
  while n >= 0   // this loop prints hello world backwards: dlrow olleh
    print s[n]
    n--

There are many more string methods for manipulating, removing, inserting, converting and formatting strings.

For more details please refer to Origo Programming language API documentation.