RAD Studio VCL Reference
|
Converts a string to a Boolean value, with error default.
function StrToBoolDef(const S: string; const Default: Boolean): Boolean; overload;
Boolean StrToBoolDef(const AnsiString S, const Boolean Default);
StrToBoolDef converts the string specified by S to a Boolean. If S can be converted to a number, StrToBoolDef returns false if that number is 0, true otherwise. If S can't be converted to a number, StrToBoolDef 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, StrToBoolDef returns Default.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|