Returns a specified number of characters from the middle of a string.

 

Syntax:

value = MiddleCharacters( inputString, start, length )

OR

value = Mid(  inputString, start, length )     '   Short form usage: "Mid"

 

Parameter:

Description:

inputString

String from which to copy the characters

start

Starting character position from which to start the character copying

First character in the text is considered character 1.

length

Number of characters to copy.

value

Copied characters.

 

Example:

value = MiddleCharacters( "Hello", 2, 3 ) ' Returns "ell"
value = MiddleCharacters( "Hello", 3, 2 ) ' Returns "ll"

 

Results:

  See example comments.

 

Links:

LeftCharacters, RightCharacters

See Also:

Data Groups and Types

 


Edit Time: 9/25/2017 09:09:54 AM


Topic ID#: 34

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software