mid()

Syntax:

mid( String, Index, Chars )

Return:

A string consisting of the given number of characters starting from the Index position in the string.

Parameters:

String - The String can be a string of text surrounded by quote marks or a variable name containing a string. This parameter is required.

Index - The Index position of the first character to return i.e. the first character is Index position 1, the second character Index position 2, and so on. Index can be a number or a variable name containing a number. This parameter is required.

Chars - The number of characters from the left of the String starting from the Index position. This parameter is optional, If this parameter is omitted all the characters to the end of the string are returned. Chars can be a number or a variable name containing a number.

Remarks:

If the number specified in Chars would exceed the length of the String, the whole of the string from the Index position is returned.

image\Script_Button.jpgExamples