Mid 部分文字取り出し

Mid関数は文字列の指定位置から指定文字数分の文字列を取り出します。
Delphiでは Copy関数を使用します。

■ Copy の使用例
procedure TForm1.Button1Click(Sender: TObject);
var
  S1, S2 : string;
  SW : WideString;
begin
  S1    :=  'Borland Delphi 5 Enterprise Edition';   
  S2    :=  Copy(S1,9,6); // "Delphi"

  S1    :=  'プログラマの気炎';
  S2    :=  Copy(S1,13,4); // "気炎"
  
  SW    :=  'プログラマの気炎';
  S2    :=  Copy(SW,7,2); // "気炎"
end;

関連項目
Left 部分文字取り出し
Len 文字列長
Right 部分文字取り出し