Table of Contents

# $EPIC: mid.txt,v 1.2 2006/08/01 05:15:58 sthalik Exp $

Synopsis:

$mid(<start> <length> <text>)

Technical:

Practical:

This function extracts a substring from a string. This can be used to strip out the first few characters of a function, or to get a field from a fixed-format string. Although ircII lets you specify a negative value for <length> to get the “rest” of the string, EPIC does not. If you need to get the “rest” of a string, use the $rest() function.

Returns:

A copy of a portion of <text>

Examples:

$mid(4 4 hello there)                returns "o th"
$mid(7 100 this is a long string)    returns " a long string"
$mid(7 -1 this is a long string)     returns ""

History:

This function first appeared in ircII.