Mid
Description:
Format:
Mid (string Source, integer Start, integer Length)
|
Parameters: |
Stringr |
Source |
Source string from which to copy characters. |
|
Integer |
Start |
Position in Source to from which to begin copying characters. |
|
|
Integer |
Length (optional) |
Number of characters to copy from Source. |
|
|
Return Value: |
String |
Result |
String consisting of copied characters. |
Usage:
Example 1:
Assign strResult 5 characters from the current document's title beginning at the 6th position.
String strResult
strResult = Mid(GetDocumentTitle(), 6, 5)
Example 2:
String strPhrases
String strResult
strPhrases = 'Super Widgets, Long Widgets, Soft Widgets'
strResult = Left(strPhrases, Pos(strPhrases, ',') - 1)
strPhrases = Mid(strPhrases, Pos(strPhrases, ',') + 1)