base.StringBuffer.subString

Return the substring at the specified position.

Syntax

subString(
   start INTEGER,
   end INTEGER )
  RETURNING result STRING
  1. start is the substring to be found.
  2. end is the ending position.

Usage

The subString() method returns the substring defined by the start and end positions passed as parameter.

The first character is at position 1.

Important: When using byte length semantics, the positions are expressed in bytes. When using char length semantics, the unit is characters. This is matters when using a multibyte locale such as UTF-8.
CALL buf.append("abcdefg")
DISPLAY buf.subString(2,5) -- Shows bcde