Re: Where is stringbuilder?
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Fri, 20 Oct 2006 10:35:48 -0500
J French wrote:
On Fri, 20 Oct 2006 13:36:38 +0200, "Maarten Wiltink"
<maarten@xxxxxxxxxxxxxxxxxx> wrote:
"J French" <erewhon@xxxxxxxxxx> wrote in message
news:45388471.503443109@xxxxxxxxxxxxxxxxxxx
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.
Slap ! SizeOf() - would it really ?
- that would mean that a Char by Char copy of one string to another
could result in a significant crunch
No, SizeOf is a compile-time constant (with one exception having to do with open arrays). If S is an AnsiString, SizeOf will return 1 above. If S is a WideString, then SizeOf will return 2. If S is a String, then SizeOf will return 1 in Win32 and 2 in .Net.
Is it actually possible in Delphi, for the number of Bytes in a string
to be different from its Length() ?
(obviously not WideString stuff)
No.
--
Rob
.
- Follow-Ups:
- Re: Where is stringbuilder?
- From: Maarten Wiltink
- 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
- Re: Where is stringbuilder?
- From: Maarten Wiltink
- Re: Where is stringbuilder?
- From: J French
- Where is stringbuilder?
- Prev by Date: Re: Where is stringbuilder?
- Next by Date: Re: Calling dot.net code/assembly from a webpage ?
- Previous by thread: Re: Where is stringbuilder?
- Next by thread: Re: Where is stringbuilder?
- Index(es):
Relevant Pages
|