webCOMAND

#SUBSTR

Return a string from a portion of a source string.

Prototype

#SUBSTR($string, $start, $length = NULL)

Parameters

  • string - The input string.
  • start - Zero-based character offset into string where returned substring should start.
  • length - Optional length in characters from the start where returned substring should end.  NULL will return all the way to the end of the input string.

Return

Returns a new string of bytes from the input string based on the specified start and length.

Example

#/ Display "is some"
#LOCAL($Text, "This is some text.")
#SUBSTR($Text, 5, 7)