ExtractStrings string interception

//Split string ExtractStrings 
var
  s: String;
  List: TStringList;
begin
  s := 'about: #delphi; #pascal, programming';
  List := TStringList.Create;
  ExtractStrings([ ';' , ',' , ':' ],[ '#' , ' ' ],PChar(s),List);
   //The first parameter is the delimiter; the second parameter is the beginning of the ignored characters

  ShowMessage(List.Text);  //about
                           //delphi
                           //pascal
                           //programming
  List.Free;
end;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324780216&siteId=291194637