Board index » delphi » PChar(string)

PChar(string)

Quote
Jonatan Magnusson wrote:

> Doesnt PChar(..string..) work in Delphi 1? If not, what's instead?

Try the StrPas() function.  It's defined as follows:

  function StrPas(Str: PChar): String;

Enjoy,
-Jim Rofkar.

 

Re:PChar(string)


Quote
Jonatan Magnusson wrote:

> Doesnt PChar(..string..) work in Delphi 1? If not, what's instead?

[Oops, wrong direction...sorry]

Try the StrPCopy() function, instead.  It's defined as follows:

  function StrPCopy(Dest: PChar; const Source: String): PChar;

As you can guess, you'll probably need a tempory PChar buffer for
Dest.

Enjoy,
-Jim Rofkar.

Other Threads