Sign in Join
FPDoc Onlineexperiment

TryStrToBool function

In unit sysutils

Try to convert a string to a boolean value.

Declaration

pascal
function TryStrToBool(const S: string; out Value: Boolean): Boolean

Description

TryStrToBool tries to convert the string S to a boolean value, and returns this value in Value. In this case, the function returns True. If S does not contain a valid boolean string, the function returns False, and the contents of Value is undetermined.

Valid boolean string constants are in the FalseBoolStrs (for False values) and TrueBoolStrs (for True values) variables.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.