Burgerlib Python
Loading...
Searching...
No Matches
True or False

This set of functions are used to convert a value that resolves to True or False to the strings "True" or "False". However, due to the need for some output streams to require a specific form of case, these functions will output the strings according to these rules. The function burger.strutils.string_to_bool() is helpful in converting a larger number of strings and numbers into a boolean.

burger.strutils.truefalse() outputs "true" or "false"

burger.strutils.TRUEFALSE() outputs "TRUE" or "FALSE"

burger.strutils.TrueFalse() outputs "True" or "False"

True False code example

# Prints "true"
# Prints "FALSE"
# Prints "True"
# Prints "True"
def TrueFalse(item)
Convert the input into a boolean and return the string "True" or "False".
Definition: strutils.py:370
def string_to_bool(item)
Convert an item to a boolean.
Definition: strutils.py:321
def truefalse(item)
Convert the input into a boolean and return the string "true" or "false".
Definition: strutils.py:398
def TRUEFALSE(item)
Convert the input into a boolean and return the string "TRUE" or "FALSE".
Definition: strutils.py:426