Construct a @see java.lang.Integer and strip a leading plus sign since Integer does not understand it. @param s @return Integer
(String s)
| 38 | * @return Integer |
| 39 | */ |
| 40 | public static Integer decode(String s) |
| 41 | { |
| 42 | if ((!s.isEmpty()) && (s.charAt(0) == '+')) |
| 43 | { |
| 44 | s = s.substring(1); |
| 45 | } |
| 46 | |
| 47 | return Integer.decode(s); |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Parse a string with an option plus or minus followed by digits |
no test coverage detected