Mid()

Syntax

Result$ = Mid(String$, StartPosition [, Length])
Description
Extracts a string of specified length from the given string.

Parameters

String$ The string to use.
StartPosition Specifies the character position to start the extracting. The first character position is 1.
Length (optional) Specifies how many characters needs to be extracted. If this parameter is omitted, characters are extracted until the end of string.

Return value

A new string holding the extracted characters.

Example

  Debug Mid("Hello", 2) ; Will display "ello"
  Debug Mid("Hello", 2, 1) ; Will display "e"

Supported OS

All

<- Len() - String Index - RSet() ->