help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

StrToBool

Convert a string to a boolean value

Declaration

Source position: sysstrh.inc line 192

function StrToBool(

  const S: String

):Boolean;

Description

StrToBool will convert the string S to a boolean value. The string S can contain one of 'True', 'False' (case is ignored) or a numerical value. If it contains a numerical value, 0 is converted to False, all other values result in True. If the string S contains no valid boolean, then an EConvertError exception is raised.

Errors

On error, an EConvertError exception is raised.

See also

BoolToStr

  

Convert a boolean value to a string.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505