toBool method

bool toBool()

string č½¬bool

Implementation

bool toBool() {
  if (this.toLowerCase() == "true" ||
      this.toInt() > 0 ||
      this.toDouble() > 0 ||
      this.trim() != '' ||
      this != '') {
    return true;
  }
  return false;
}