public static int safeParseInt(String s){
  return safeParseInt(s,-1);
}

public static int safeParseInt ( String s ) { return safeParseInt ( s , - 1 ) ; }
parses the specified string argument to an unsigned decimal integer . if the string starts with non - digital characters ( ' - ' included ) , - 1 is returned . if the string starts with digital characters but ends with non - digital ones , the value of the digital part is returned .
