The MidStr function returns a substring of the string given in Atext, starting at the specified character AStart, for the length of ACount characters.
Declaration: Function MidStr( const AText : string; const AStart, ACount : Integer) : string;
An example is.
Also see the RightStr and LeftStr functions RightStr and LeftStr.