Builtin

str_bool

str_bool{s:str, b:bool}

A relation generator. Can convert string s into boolean b and vice-versa.

For each string that cannot be parsed, no tuple is returned.

Examples

str_bool(s:="true")
bformatdefault
truefalse

str_bool(b:=false)
sformatdefault
falsefalse