Board index » delphi » PChar 2 String

PChar 2 String

hi!

a friend of mine is working on a file-selector and would like to know
how to convert a string of tipe PChar to one of type String.

thanks!

 

Re:PChar 2 String


Brain Power allegedly said:

BP> a friend of mine is working on a file-selector and would like to know
BP> how to convert a string of tipe PChar to one of type String.

StringVar := StrPas(PCharVar);

                                  |15T|07h|08e |15D|07a|08rk |15K|07n|08ight

--
| Jeff Teunissen -=- President, Dusk To Dawn Computing      Team OS/2
| Disclaimer: I am my employer, so anything I say goes double for me.
| Email: d...@grfn.org          URL: http://www2.dhinternet.com/~deek

Re:PChar 2 String


Quote
Brain Power wrote:
> a friend of mine is working on a file-selector and would like to know
> how to convert a string of tipe PChar to one of type String.

Use StrPas in the strings unit (I think)

Jochen

Re:PChar 2 String


Quote
Brain Power wrote:
> hi!

> a friend of mine is working on a file-selector and would like to know
> how to convert a string of tipe PChar to one of type String.

> thanks!

Mainly a case of RTFM.  Look up StrPas().  Also, if you intend to work
with PChar strings, it will help to read the chapter on null-terminated
strings in the Language Guide.

--
Scott Earnest        | We now return you to our regularly |
set...@ix.netcom.com | scheduled chaos and mayhem. . . .  |

Re:PChar 2 String


On Thu, 20 Feb 1997 18:49:40 GMT,  pcada...@mail.telepac.pt (Brain Power) wrote:

Quote
>hi!

>a friend of mine is working on a file-selector and would like to know
>how to convert a string of tipe PChar to one of type String.

>thanks!

Lookup: StrPAS

It would be a good idea to spend some time and review the interface (e.g.
procedures and functions) of the STRINGS Unit.  Or with online help, press
Shift+F1, type "STRINGS", cursor down to the "Strings Unit" entry and press
"ENTER".  You'll find some *must* know information concerning ASCIIZ string
functions.

    ...red

Other Threads