Re: Where is stringbuilder?
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Oct 2006 13:36:38 +0200
"J French" <erewhon@xxxxxxxxxx> wrote in message
news:45388471.503443109@xxxxxxxxxxxxxxxxxxx
[...]
I'm not sure about this, but my understanding is that Delphi treats a
String as an array of Bytes unless one uses the ANSI prefixed routines
which might treat some combinations of two bytes as one Char if one is
in a MBCS locale
You're right that it doesn't matter to the _language_. It's the
libraries where the difference starts to matter, mostly.
But the biggest problem (as usual) is in keeping things straight in
people's heads. I try to write _correct_ code and to encourage others
to do so. That requires, for example, being aware of the difference
between a string of 2-byte Unicode (UCS-2) characters, a string of
1-byte windows-1252 (not the same as either ISO-8859-1 or US-ASCII,
but close) characters, and a stream of bytes that encodes in UTF-8
either of those strings.
Is there ever a case where Length( S[n] ) = 2 ?
No. A character is a character even if it's a WideChar.
SizeOf(S[n]) might, though.
Groetjes,
Maarten Wiltink
.
- Follow-Ups:
- Re: Where is stringbuilder?
- From: J French
- Re: Where is stringbuilder?
- References:
- Where is stringbuilder?
- From: brett
- Re: Where is stringbuilder?
- From: Rob Kennedy
- Re: Where is stringbuilder?
- From: J French
- Re: Where is stringbuilder?
- From: Rob Kennedy
- Re: Where is stringbuilder?
- From: J French
- Re: Where is stringbuilder?
- From: Rob Kennedy
- Re: Where is stringbuilder?
- From: Maarten Wiltink
- Re: Where is stringbuilder?
- From: J French
- Where is stringbuilder?
- Prev by Date: Re: NT Service and Sockets
- Next by Date: Re: Where is stringbuilder?
- Previous by thread: Re: Where is stringbuilder?
- Next by thread: Re: Where is stringbuilder?
- Index(es):
Relevant Pages
|