Converts a string to a Boolean value.
function StrToBool(const S: string): Boolean; overload;
Boolean StrToBool(const AnsiString S);
StrToBool 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.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|