MID$ (Function)

is a function which takes one string parameter, and two numerical parameters, both of which get rounded down. If either number is negative, the function generates an  error. Otherwise, the function removes the first  characters from the string, and returns the   characters that follow. If  is greater than or equal to the length of the string, or if   is zero, the function returns the empty string, and if   is greater than the length of the string after   characters are removed, the function returns only to the end of the string. Thus, the result would ordinarily be  characters long in typical usage, but it can be fewer (even zero).