Icon StrToBoolDef

Unit: WebCore

Available In: Client and Server Applications

function StrToBoolDef(const Value: String;
                      DefaultValue: Boolean=False): Boolean

The StrToBoolDef function returns True if the input parameter is 'True' (case-insensitive), and False if the input parameter is 'False' (case-insensitive also). If the input parameter is not a valid boolean string, the return value is the specified default value.

Examples

X := StrToBoolDef('Hello',False);  // X is False
Image