2019-02-26 20:38:27 +01:00
|
|
|
package info.nightscout.androidaps.utils;
|
2018-06-23 21:36:18 +02:00
|
|
|
|
2019-06-16 09:00:47 +02:00
|
|
|
import info.nightscout.androidaps.MainApp;
|
|
|
|
import info.nightscout.androidaps.R;
|
|
|
|
|
2018-06-23 21:36:18 +02:00
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
2019-06-02 16:24:51 +02:00
|
|
|
|
|
|
|
public static boolean emptyString(final String str) {
|
|
|
|
return str == null || str.length() == 0;
|
|
|
|
}
|
2018-06-23 21:36:18 +02:00
|
|
|
}
|