//分割字符串 ExtractStrings var s: String; List: TStringList; begin s := ‘about: #delphi; #pascal, programming‘; List := TStringList.Create; ExtractStrings([‘;‘,‘,‘,‘:‘],[‘#‘,‘ ‘],PChar(s),List); //第一个参数是分隔符; 第二个参数是开头被忽略的字符 ShowMessage(List.Text); //about //delphi //pascal //programming List.Free; end;
时间: 2024-10-01 02:35:01