From f9fa82f1ef5453d5e7420defccae8b00be1b97fd Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sun, 14 Oct 2018 20:47:00 +0200 Subject: [PATCH] replace swedish minus sign with default minus sign --- app/src/main/java/info/nightscout/utils/SafeParse.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/info/nightscout/utils/SafeParse.java b/app/src/main/java/info/nightscout/utils/SafeParse.java index ff749f732b..7d6d890b0e 100644 --- a/app/src/main/java/info/nightscout/utils/SafeParse.java +++ b/app/src/main/java/info/nightscout/utils/SafeParse.java @@ -11,6 +11,7 @@ public class SafeParse { public static Double stringToDouble(String input) { Double result = 0d; input = input.replace(",", "."); + input = input.replace("−", "-"); if (input.equals("")) return 0d; try { @@ -24,6 +25,7 @@ public class SafeParse { public static Integer stringToInt(String input) { Integer result = 0; input = input.replace(",", "."); + input = input.replace("−", "-"); if (input.equals("")) return 0; try { @@ -37,6 +39,7 @@ public class SafeParse { public static Long stringToLong(String input) { Long result = 0L; input = input.replace(",", "."); + input = input.replace("−", "-"); if (input.equals("")) return 0L; try {