Skip to content

mid

Substring starting at a given position.

v = mid(text, start_num, num_chars)

Returns num_chars characters from text, starting at position start_num (1-based). If start_num exceeds len(text), returns an empty string.

mid('hello world', 7, 5) % 'world'
mid('abcdef', 2, 3) % 'bcd'
  • left — First N characters of a string.
  • right — Last N characters of a string.
  • midb — Substring by byte position and length.