diff options
author | Ugnich Anton | 2013-11-16 03:22:57 +0700 |
---|---|---|
committer | Ugnich Anton | 2013-11-16 03:22:57 +0700 |
commit | 211edb389dcf5912b02346869264ea5dcd4cf75e (patch) | |
tree | 43c6c729d5293e3df9e88ab8f691c9f415a8ae31 /src/java/com/juick/api/Utils.java | |
parent | 91bf74631157d8e559686ca25e4980f155d88438 (diff) |
Messages.doGetHome
Diffstat (limited to 'src/java/com/juick/api/Utils.java')
-rw-r--r-- | src/java/com/juick/api/Utils.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/java/com/juick/api/Utils.java b/src/java/com/juick/api/Utils.java index b406c362..10e0cccb 100644 --- a/src/java/com/juick/api/Utils.java +++ b/src/java/com/juick/api/Utils.java @@ -135,4 +135,15 @@ public class Utils { ret = ret.replaceAll("@", "\\\\@"); return ret; } + + public static int parseInt(String str, int def) { + int ret = def; + if (str != null) { + try { + ret = Integer.parseInt(str); + } catch (Exception e) { + } + } + return ret; + } } |