Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Java string to delphi (https://www.delphipraxis.net/72087-java-string-delphi.html)

pastra 25. Jun 2006 13:29


Java string to delphi
 
Hi, does anyone know the how to do the following in delphi.

JAVA:
Delphi-Quellcode:
string + '\0'
What does \0 mean in java?

Thank's to everyone!

CalganX 25. Jun 2006 13:30

Re: Java string to delphi
 
Hi,
I suppose it means the ASCII-/Unicode-Character 0. In Delphi it would be
Delphi-Quellcode:
chr(0);
// or
#0
Chris

pastra 25. Jun 2006 13:33

Re: Java string to delphi
 
Zitat:

Zitat von Chakotay1308
Hi,
I suppose it means the ASCII-/Unicode-Character 0. In Delphi it would be
Delphi-Quellcode:
chr(0);
// or
#0
Chris

Hi!
Okay but what char. should reprecent chr(0) then? Don't they start at 1 and goes forward to 256? Or am i Mistaken?

glkgereon 25. Jun 2006 13:34

Re: Java string to delphi
 
It goes from 0 to 255 ;-)

0 normally represents the end of a string in C or java as far as i remember...

Waldteufel 25. Jun 2006 13:35

Re: Java string to delphi
 
Zitat:

Zitat von pastra
Okay but what char. should reprecent chr(0) then? Don't they start at 1 and goes forward to 256? Or am i Mistaken?

Slightly. It's 0 to 255 ;-)

>> http://en.wikipedia.org/wiki/ASCII <<

(Nanu? Vorhin war das Posting da oben noch nicht da... :gruebel:)

pastra 25. Jun 2006 13:36

Re: Java string to delphi
 
Zitat:

Zitat von glkgereon
It goes from 0 to 255 ;-)

0 normally represents the end of a string in C or java as far as i remember...

Okay then :)

I will try to use the chr(0) then and see how it works out..

Thanks


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:31 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