parseBool method

bool parseBool()

Implementation

bool parseBool() {
  if (this.toLowerCase() == 'true') {
    return true;
  } else if (this.toLowerCase() == 'false') {
    return false;
  }

  throw '"$this" can not be parsed to boolean.';
}