StringParsedAsBoolean

Typeoperator
DictionaryLCB
LibraryLiveCode Builder
Syntax
<Operand> parsed as boolean
Associationscom.livecode.logic
Summary

Parses a string as a boolean value

Parameters
NameTypeDescription
Operand

An expression that evaluates to a string.

Example
variable tString as String
variable tBool as optional Boolean
put "false" into tString
put tString parsed as boolean into tBool -- tBool contains false
variable tBool as optional Boolean
put "flase" parsed as boolean into tBool -- tBool is nothing
Values
NameTypeDescription
return

true or false

Description

Use StringParsedAsBoolean when you want to determine if a string contains "true" or "false"

Note: Only the strings "true" and "false" will parse to give a boolean value. Any other input will cause an error to be thrown.