字符串函数大全(24) Result := TryStrToFloat(S, LResult); if Result then Value := LResult <> 0 else begin Result := True; //修正处 VerifyBoolStrArray; if CompareWith(TrueBoolStrs) then Value := True else if CompareWith(FalseBoolStrs) then Value := False else Result := False; end; end; ///////End TryStrToBool ━━━━━━━━━━━━━━━━━━━━━ 首部 function BoolToStr(B: Boolean; UseBoolStrs: Boolean = False): string; $[SysUtils.pas 功能 返回逻辑值B转换成字符串 说明 BoolToStr(False, False)='0';BoolToStr(False, True)='-1' 参考 var SysUtils.TrueBoolStrs;var SysUtils.FalseBoolStrs 例子 Edit1.Text := BoolToStr(CheckBox1.Checked, CheckBox2.Checked); ━━━━━━━━━━━━━━━━━━━━━ 首部 function LoadStr(Ident: Integer): string; $[SysUtils.pas 功能 返回根据标识Ident的字符串资源 说明 字符串资源是指程序的内部资源 参考 function SysUtils.FindStringResource 例子 Edit2.Text := LoadStr(StrToIntDef(Edit1.Text, 0)); ━━━━━━━━━━━━━━━━━━━━━ 首部 function FmtLoadStr(Ident: Integer; const Args: array of const): string; $[SysUtils.pas