Name

lsubstring — Extracts a substring in UTF-8 encoded string

Synopsis

string lsubstring ( string STRING ,
  integer OFFSET ,
  integer LENGTH );
 

Parameters

string STRING

integer OFFSET

integer LENGTH

Return

string

Description

Extracts a substring of the string STRING, starting at OFFSET after the first one with length of at most LENGTH. OFFSET starts with 0. This method uses UTF-8 encoding.

Usage

  lsubstring ("some text", 5, 2) -> "te"
  lsubstring ("some text", 42, 2) -> ""
  lsubstring("123456789", 2, 3) -> "345"