Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   delphi – How to convert a null terminated string to string? – Stack Overflow (https://www.delphipraxis.net/205839-delphi-%96-how-convert-null-terminated-string-string-%96-stack-overflow.html)

DP News-Robot 22. Okt 2020 06:10

delphi – How to convert a null terminated string to string? – Stack Overflow
 
An old trick that I tend to forget: [WayBack] delphi – How to convert a null terminated string to string? – Stack Overflow: You can assign a null-terminated*PChar*directly to a*String: function GetFileName(DiskName: TFileNameIO): string; begin Result := PChar(@DiskName); end; It can work even on string literals and constants, where you can leave out the @, […]

Weiterlesen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:43 Uhr.

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