Name

substring — Return part of a string

Synopsis

string substring ( string  s ,
  inetger  start ,
  integer  end );

Parameters

string s

Original String

inetger start

Start posistion

Optional Arguments

integer end

End Posistion

Return

string

Description

Returns the portion of string specified by the start and length parameters.

Usage

  substring ("some text", 5) -> "text"
  substring ("some text", 42) -> ""
  substring ("some text", 5, 2) -> "te"
  substring ("some text", 42, 2) -> ""