AndroidAPS/app/src/main/java/info/nightscout/utils/StringUtils.java

21 lines
525 B
Java
Raw Normal View History

2018-06-23 21:36:18 +02:00
package info.nightscout.utils;
/**
* class contains useful String functions
*/
public class StringUtils {
private StringUtils() {
// this constructor is private, since this class should not get instantiated
}
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;
}
}