var ss,s: string; begin ss := 'CodeGear Delphi 2007'; s := RightStr(ss,4); ShowMessage(s); {2007} s := LeftStr(ss,4); ShowMessage(s); {Code} end;