Method code for $string.is_boolean()

[Turn on line numbering]
arg str;

if (match_regexp(str, "^(yes|y|true|t|1)$"))
    return 1;
if (match_regexp(str, "^(no|n|false|f|0)$"))
    return 0;
return -1;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon