DELPHI/Sample Source

[Delphi 문법] "ExTractStrings" 간단 예제

Kim.Sung 2021. 1. 1. 16:11
728x90

※ 사용 하고있는 문법 중 추후 찾아 보기 용이하게 간단하게 기록 및 필요 한 사람을 위한 기록

※ ExTractStrings 문법 사용시 Parsing 갯수를 고정으로 가져가기 때문에 코딩 시 주의

 

- 실행 화면

1) 간단 예제 실행 화면

 

** - 실행 전**

** - 실행 후**

2) Sample Source

begin

  try
    sWords := TStringList.Create;
    strtemp := edt_msg.text;

 

    if ExTractStrings(['/'], [], PChar(strtemp), sWords) = 0 then Exit;
    sWhere := '';

 

    edt_parsing1.Text := sWords[0];
    edt_parsing2.Text := sWords[1];
    edt_parsing3.Text := sWords[2];
    edt_parsing4.Text := sWords[3];
    edt_parsing5.Text := sWords[4];
    edt_parsing6.Text := sWords[5];
    edt_parsing7.Text := sWords[6];
    edt_parsing8.Text := sWords[7];
    edt_parsing9.Text := sWords[8];
    edt_parsing10.Text := sWords[9];

  finally

    sWords.Free;

  end;

end;

 

 

728x90