toInt function

int toInt(
  1. String str
)

Implementation

int toInt(String str){
  int ret = 0;
  try {
    ret = int.parse(str);
  }catch(_){}
  return ret;
}