uses StrUtils
// 测试 procedure TfrmMain.btnStrClick(Sender: TObject); var info: string; begin try info:= 'delphi is a rap'; mmLine.Lines.Add(LeftStr(info, 5)); //从左往右截取,长度是5 mmLine.Lines.Add(MidStr(info, 5, 2)); //从第5个字符开始截取,长度是2 mmLine.Lines.Add(RightStr(info, 5)); //从右往左截取,长度是5 finally end; end;