TStringHelper.ToBoolean

Convert string to boolean

Declaration

Source position: syshelph.inc line 93

public 
  class function ToBoolean(const S: string) : Boolean;  Overload;  Static;
  function ToBoolean : Boolean;  Overload;

Description

ToBoolean returns the contents of the string S as a boolean (if possible). It uses StrToBool to convert the value to a boolean.

Errors

If the string contains a value that cannot be translated to a boolean, an EConvertError exception may be raised.

See also

Name Description
EConvertError Conversion error.
StrToBool Convert a string to a boolean value
TStringHelper.ToDouble Convert string to double-sized floating point value
TStringHelper.ToExtended Convert string to extended-sized floating point value
TStringHelper.ToInt64 Convert string to 64-bit signed integer
TStringHelper.ToInteger Convert string to 32-bit signed integer
TStringHelper.ToSingle Convert string to single-sized floating point value