var
s: string;
begin
s := '';
if s ='' then
begin
end;
if length(s) = 0 then
begin
end;
end;
Unit1.pas.30: s := '';
004564AB 8D45FC lea eax,[ebp-$04]
004564AE E861E3FAFF call @LStrClr
Unit1.pas.31: if s ='' then
004564B3 837DFC00 cmp dword ptr [ebp-$04],$00 //看看s是不是空指针即可
Unit1.pas.35: if length(s) = 0 then
004564B7 8B45FC mov eax,[ebp-$04]
004564BA 85C0 test eax,eax
004564BC 7405 jz $004564c3
004564BE 83E804 sub eax,$04 //先判断不是空的情况下取地址的-4偏移处的长度
004564C1 8B00 mov eax,[eax]
004564C3 85C0 test eax,eax