(30 lines)
4 Converts a text representation of a boolean value into a boolean. Acceptable5 boolean values are case-insensitive variations of `yes`/`no`, `y`/`n`,6 `true`/`false`, `on`/`off`.10 `yes` if the string matches a recognized truthy boolean value; otherwise return `no`.15 The string containing the boolean value.20 If non-none, this argument will be set to the remainder of the text after the matching part.21 If none, parsing will only succeed if the entire text matches.23 assert Bool.parse("yes") == yes24 assert Bool.parse("no") == no25 assert Bool.parse("???") == none27 assert Bool.parse("yesJUNK") == none28 remainder : Text29 assert Bool.parse("yesJUNK", &remainder) == yes30 assert remainder == "JUNK"