toBool method

bool toBool()

将字符串转换为bool

Implementation

bool toBool() {
  return this == 'true' || this == '1';
}