SIMPOL Documentation

String Functions

There is a special set of intrinsic functions for working with strings, just as there are for blobs. The following list contains all of the string-specific intrinsic functions:

  • .instr()

  • .len()

  • .lstr()

  • .rstr()

  • .substr()

The first of the functions is used for finding a match for a string within another string. The second returns the length of the string in characters (not bytes!), and the last three are for slicing up a string; .lstr() returns a string beginning at the first character for the desired number of characters, .rstr() does the same starting from the end of the string and working toward the beginning, and .substr() takes a starting point and a count and works from left-to-right to return any substring from any point in the original string. For the precise technical description of these functions, see the "String Functions" section of the "Intrinsic Functions" chapter in the "SIMPOL Language Reference".