function StrCutRight(const S : string; const Count : integer) : string; begin result := S; if (count = 0) or (count > Length(S)) then exit; SetLength(result,Length(S)-Count); end; S := StrCutRight('Bonjour',3); renvois : "Bonj"