Method code for $string.is_boolean()

[Turn off line numbering]
  1: arg str;
  2: 
  3: if (match_regexp(str, "^(yes|y|true|t|1)$"))
  4:     return 1;
  5: if (match_regexp(str, "^(no|n|false|f|0)$"))
  6:     return 0;
  7: return -1;

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

Tlon