From 211edb389dcf5912b02346869264ea5dcd4cf75e Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sat, 16 Nov 2013 03:22:57 +0700 Subject: Messages.doGetHome --- src/java/com/juick/api/Utils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/java/com/juick/api/Utils.java') 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; + } } -- cgit v1.2.3