Thema: Delphi c-strings aufsplitten

Einzelnen Beitrag anzeigen

Benutzerbild von Union
Union

Registriert seit: 18. Mär 2004
Ort: Luxembourg
3.487 Beiträge
 
Delphi 7 Enterprise
 
#2

AW: c-strings aufsplitten

  Alt 17. Jul 2015, 14:47
Vielleicht so:
Delphi-Quellcode:
var
  PA : PAnsiChar;
  SL : TStringList;
  AC : PAnsiChar;

SL := TStringList.Create;
    try
      AC := Pointer(PA);
      while AC^ <> #0 do
      begin
        S := '';
        while AC^<> #0 do
        begin
          S := S + AC^;
          Inc(AC);
        end;
        SL.Add(S);
        Inc(AC);
      end;

      for S in SL do
        writeln(S);

      Readln;
    finally
      SL.Free;
    end;
Ibi fas ubi proxima merces
sudo /Developer/Library/uninstall-devtools --mode=all
  Mit Zitat antworten Zitat