Ich habs mir grade selber gemacht. (Wer nun an was anderes denk, ist ein Ferkel
)
Falls es mal jemand braucht...
Delphi-Quellcode:
{------------------------------------------------------------------------------
function UnEscapeStr(aString:String;var ms:TMemoryStream):Integer - 10.10.2011 14:50
Convertiert einen EscString in einen MemoryStream zurueck
------------------------------------------------------------------------------}
function UnEscapeStr(aString:String;var ms:TMemoryStream):Integer;
var
i :Integer;
line :String;
pc :PChar;
begin
Result:=0;
i:=1;
line:='';
while ( i<Length(aString) ) do begin
if ( aString[i]='\' ) then begin
inc(i);
case aString[i] of
't': line:=line+#9;
'n': line:=line+#10;
'r': line:=line+#13;
'0': line:=line+#0;
else
line:=line+aString[i];
end;
end else begin
line:=line+aString[i];
end;
inc(i);
end;
pc:=PChar(line);
ms.write(pc^,Length(line));
Result:=ms.Size;
end; {function UnEscapeStr(aString:String;var ms:TMemoryStream):Integer}