How about A[0] = 0; ?
> [EMAIL PROTECTED] <mailto:owner-delphi@;delphi.org.nz>
> wrote on
>
> Nope, That is the most efficient form ie (A = ''). The compiler does
> a nice job of optimising it - basically a single instruction -
> ignoring the jmp
>
> eg
> cmp dword ptr [es],$00
> jnz ...
>
> Compare this to Length(A)
>
> Move eax, ecx
> Call @LStrLen
> test eax,eax
> jnz ...
>
> And LStrLen is
> tst eax,eax
> jz $03
> mov eax,[eax-4]
> ret
>
> Myles.
>
>
>
>
>
> -----Original Message-----
> From: vss [mailto:vss@;vss.co.nz]
> Sent: Thursday, 31 October 2002 4:04 p.m.
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: Empty string test
>
>
> I second that. if legnth(mystring)=0 then showmessage('its empty')
>
> Jeremy
>
> -----Original Message-----
> From: "Jeremy North" <[EMAIL PROTECTED]>
> To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
> Date: Thu, 31 Oct 2002 14:00:41 +1100
> Subject: Re: [DUG]: Empty string test
>
>>
>> I was once told that checking the length was.
>> The person that told me said that it was recommend by boundschecker
>> application. JED
>>
>>> Whats the fastest way to test for an empty string
>>> I just get the feeling that String = '' is not good practice
>>
>>
>>
>> This email and any files transmitted with it are confidential and
>> intended solely for the use of the individual or entity to whom they
>> are addressed. If you have received this email in error please
>> notify the [EMAIL PROTECTED]
>>
>>
> --------------------------------------------------------------
> ---------
>> ----
>> New Zealand Delphi Users group - Delphi List -
>> [EMAIL PROTECTED] Website:
>> http://www.delphi.org.nz To UnSub, send email to:
>> [EMAIL PROTECTED] with body of "unsubscribe delphi"
>> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
> --------------------------------------------------------------
> -------------
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> --------------------------------------------------------------
> -------------
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/