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 string in array of Char umwandeln (https://www.delphipraxis.net/29186-string-array-char-umwandeln.html)

mytar 6. Sep 2004 09:50

Re: string in array of Char umwandeln
 
Wenn du die Länge von MyStr nicht immer gleich ist, dann

Delphi-Quellcode:
var
  MyCharArry: TCharDynArray;
  MyStr: String;
begin

  MyStr := 'Hello World!';
  SetLength(MyCharArry, Length(MyStr));

  StrCopy(MyCharArry, PChar(MyStr));

end;
P.S.: Ich hoffe jetzt das StrCopy und StrLCopy dyn. Arrays akzeptieren.

himitsu 6. Sep 2004 09:52

Re: string in array of Char umwandeln
 
Jo, hatte es auch gerade wieder gefunden.

Also es ist in SysUtils und dort wird es auch so ähnlich gemacht (nagut, dort halt nur in ASM)

Ach ja, szTip hat keine Länge von 30 Zeichen:
Delphi-Quellcode:
  _NOTIFYICONDATAA = record
    ...
    szTip: array [0..63] of AnsiChar;
  end;


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

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