MCPcopy
hub / github.com/flowjs/flow.js / toLong

Method toLong

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

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

(String value, long def)

Source from the content-addressed store, hash-verified

15 * @return
16 */
17 public static long toLong(String value, long def) {
18 if (isEmpty(value)) {
19 return def;
20 }
21
22 try {
23 return Long.valueOf(value);
24 } catch (NumberFormatException e) {
25 e.printStackTrace();
26 return def;
27 }
28 }
29
30 /**
31 * Convert String to int

Callers 1

getResumableInfoMethod · 0.95

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected