Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Hex in String umwandeln (https://www.delphipraxis.net/57741-hex-string-umwandeln.html)

Lemmy1 25. Nov 2005 19:00

Re: Hex in String umwandeln
 
Müsste wohl daran liefen, dass da Linebreak drins sind. Ich geh halt immer von Space zu Space.

Bekommst Du sowas hin?

faux 25. Nov 2005 19:06

Re: Hex in String umwandeln
 
Delphi-Quellcode:
var
  input, tmp, output: string;
  i: integer;
begin
  input := '44 65 69 6E 65 20 51 75 65 6C 6C 65 20 73 74 69';
  for i := 1 to length(input) do
  begin
    if input[i] = ' ' then
    begin
      output := output + chr(strtoint(tmp));
      tmp := '';
    end
    else
      tmp := tmp + input[i];
  end;
So vielleicht?

Grüße
Faux

3_of_8 25. Nov 2005 19:07

Re: Hex in String umwandeln
 
Wie wäre es statt mit memo1.text mit memo1.lines.delimiter:=''; und memo1.lines.delimitedtext?

Neutral General 25. Nov 2005 19:18

Re: Hex in String umwandeln
 
Hat sich erledigt. Lemmys Code hat doch funktioniert. Ich bin grad nur irgendwie verwirrt und krieg das alles nicht hin^^
Aber es klappt. Thx @all :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:19 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz