StringMid()
- Last UpdatedJul 22, 2024
- 1 minute read
Extracts a specific number of characters from a starting point within a string and returns the extracted character string as the result.
Category
String
Syntax
StringResult = StringMid( Text, StartChar, Chars );
Parameters
Text
Actual string or a string attribute to extract a range of characters.
StartChar
The position of the first character within the string to extract. Any number or an integer attribute.
Chars
The number of characters within the string to return. Any number or an integer attribute.
Remarks
This function is slightly different than the StringLeft() function and StringRight() function in that it allows you to specify both the start and end of the string that is to be extracted.
Examples
StringMid("The Furnace is Overheating",5,7); ' returns "Furnace";
StringMid("The Furnace is Overheating",13,3); ' returns "is ";
StringMid("The Furnace is Overheating",16,50); ' returns "Overheating"