Function Reference

StringMid

Extracts a number of characters from a string.

StringMid ( "string", start [, count] )

 

Parameters

string The string to evaluate.
start The character position to start. (1 = first character)
count [optional] The number of characters to extract. By default the entire remainder of the string.

 

Return Value

Returns the extracted string.

 

Remarks

If start is out-of-bounds, an empty string is returned. If start is valid but count is out-of-bounds, the entire remainder of the string is returned.

 

Related

String, StringInStr, StringLeft, StringLen, StringLower, StringRight, StringTrimLeft, StringTrimRight, StringUpper

 

Example


$var = StringMid("I am a string", 3, 2)
MsgBox(0, "2 chars extracted from position 3 are:", $var)