MidS1 allocates and returns a string which consists of the portion of the string pointed to by s beginning with location n. Locations are numbered starting with one. If flag is set, a copy of the remainder of the string is returned. Otherwise, a copy of the next m characters is returned. If flag is clear and m is zero, the null string is returned. Similarly if location n lies beyond the end of the string, the null string is returned. If flag is clear and m is larger than the number of characters remaining in the string, a copy of the remainder of the string is returned. This function implements the BASIC MID$ function.
RightS allocates and returns a copy of the last (right-most) n characters of the string pointed to by s. If n is zero, the null string is returned. If n is greater than the length of the string, a copy of the entire string is returned. This function implements the BASIC RIGHT$ function.
from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber