Mid - return characters from the middle of a string

Return to Introduction  Previous page  Next page

$return = mid(string,start[,length])

Where:

 

$returnthe characters from the middle of the string.
stringthe input string of characters.
startthe starting position within the string.
lengththe number of characters to return.        If length is not specified, all the characters from the starting position to the end of the string are returned.
       

string, start and length may be variables.

The mid command returns the specified number of characters starting at the start position.

Examples

$return = mid("abcefgh",2)

$return = mid("abcefgh",2,2)

$return = mid($text,$start,$length)

 

See Also:

 

Left

Right

Script Command Summary

Script Variables

Using the Scripting Language


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.