Merge pull request #1505 from MilosKozak/swedish-numberformat-fix

replace swedish minus sign with default minus sign
This commit is contained in:
Milos Kozak 2018-10-14 21:41:08 +02:00 committed by GitHub
commit 295ed6dba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {