Back to project page survey_sdk_android.
The source code is released under:
Apache License
If you think the Android project survey_sdk_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.survey.android.util; /*from w w w. j a v a 2s . co m*/ public class Utility { public static boolean isStringNullOrEmpty(String value) { boolean result = false; if (value == null || value == "") { result = true; } return result; } public static String RestrictLength(String value, int len) { String result = ""; if (value.length() > len) { result = value.substring(0, len-1) + "..."; } else { result = value; } return result; } public static String capitalize(String s) { if (s == null || s.length() == 0) { return ""; } char first = s.charAt(0); if (Character.isUpperCase(first)) { return s; } else { return Character.toUpperCase(first) + s.substring(1); } } public static String parseDouble(double num) { if((int) num == num) return Integer.toString((int) num); return String.valueOf(num); } }