String Copy 

www.madshi.net

The "Keep*" functions work like "System.Copy", but they change the input parameter instead of returning the changed string. The functions "CopyR" and "KeepR" copy the last "count" characters.

function  CopyR (const str : string;
                 count     : cardinal) : string;
procedure KeepR (var   str : string;
                 count     : cardinal);
procedure Keep  (var   str : string;
                 index     : cardinal;
                 count     : cardinal = maxCard);

// Example:
CopyR('Test123', 3)  ->  '123'