May 13, 2021 VBScript
The VBScript Mid function is used to return a specified number of characters from a string.
The Mid function returns a specified number of characters from the string.
Tip: Use the Len function to determine the number of characters in the string.
parameter | describe |
---|---|
string | Required.A string expression that returns a character. |
start | Required.The start position is specified.Returns an empty string (") if set to the number of characters larger than the string. |
length | Optional.The number of characters to be returned. |
Returns 1 character, starting with position 1:
The above example output results:
Returns 15 characters, starting at position 1:
The above example output results:
Return all characters, starting with position 1:
The above example output results:
Returns all characters, starting at position 12:
The above example output results: