MCPcopy Index your code
hub / github.com/flowjs/flow.js / toInt

Method toInt

samples/java/src/resumable/js/upload/HttpUtils.java:36–46  ·  view source on GitHub ↗

Convert String to int @param value @param def default value @return

(String value, int def)

Source from the content-addressed store, hash-verified

34 * @return
35 */
36 public static int toInt(String value, int def) {
37 if (isEmpty(value)) {
38 return def;
39 }
40 try {
41 return Integer.valueOf(value);
42 } catch (NumberFormatException e) {
43 e.printStackTrace();
44 return def;
45 }
46 }
47}

Callers 2

getResumableInfoMethod · 0.95

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected