Delphi IDE (89)
Windows with Delphi (280)
About this site
Links to us
General :: Programming :: Delphi :: Strings
Algorithms for string handling problems, implemented in Delphi but useful for any procedural language.
This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Generated 20:02:06 on Oct 17, 2018
A tricky way to use SetLength()
Several Windows API functions that retrieve a string get a PChar as an argument and
return the number of bytes retrieved. This return value can be used for SetLength().
An example for that is the function GetWindowsDirectory() that is used in the following
piece of code:
You don't like the formatting? Check out SourceCoder then!
function GetWindowsDir: string;
SetLength(Result, GetWindowsDirectory(PChar(Result), Length(Result)));
|Most recent comments