Problem

Return Integer.parseInt(s) for non-empty numeric strings.

Examples

  • parseIntSafe("42") -> 42
  • parseIntSafe("-3") -> -3
Compile and test (Ctrl+Enter)