AndroidAPS/app/src/main/java/info/nightscout/androidaps/utils/StringUtils.java
2019-12-31 13:25:28 +01:00

24 lines
611 B
Java

package info.nightscout.androidaps.utils;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
/**
* class contains useful String functions
*/
public class StringUtils {
public static String removeSurroundingQuotes(String string) {
if (string.length() >= 2 && string.charAt(0) == '"'
&& string.charAt(string.length() - 1) == '"') {
string = string.substring(1, string.length() - 1);
}
return string;
}
public static boolean emptyString(final String str) {
return str == null || str.length() == 0;
}
}