Converts a string to a boolean value.UnitSysUtilsCategorytype conversion routinesfunction StrToBool(const S: string): Boolean;DescriptionStrToBool converts the string specified by S to a boolean. If S can be converted to a number, StrToBool returns False if that number is 0, True otherwise. If S can't be converted to a number, StrToBool returns True if S is any of the strings listed in TrueBoolStrs (or differs from one only by case) and False if it is any of the strings listed in FalseBoolStrs (or differs from one only by case). If S is not a number and not one of the strings listed in TrueBoolStrs or FalseBoolStrs, StrToBool raises an EConvertError exception.Note: If you do not assign a value to TrueBoolStrs, it is treated as if it contains the single string ? TRUE? Similarly, if you do not assign a value to FalseBoolStrs, it is treated as if it contains the single string 'FALSE';
StrToBool('0') := False
StrToBool('1') := True
uses SysUtils;
TRUE? Similarly, if you do not assign a value to FalseBoolStrs, it is treated as if it contains the single string 'FALSE';