[chronojump] Fixed CSVDecimalColumnIsPoint (fixing really eventual problems on export on R)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed CSVDecimalColumnIsPoint (fixing really eventual problems on export on R)
- Date: Tue, 22 Jun 2021 15:50:53 +0000 (UTC)
commit 148241bfe25f78b3b979c9ddf6e4e336318d0b98
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jun 22 17:50:14 2021 +0200
Fixed CSVDecimalColumnIsPoint (fixing really eventual problems on export on R)
src/util.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/util.cs b/src/util.cs
index 452fe79cc..5eb1970da 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -67,7 +67,12 @@ public class Util
if(! Util.IsNumber(Util.ChangeDecimalSeparator(strFull[column]), true))
continue;
- return(strFull[column].Contains("."));
+ //it could be a int, or a double, if is a double check the decimal sep
+ if(strFull[column].Contains("."))
+ return true;
+ else if(strFull[column].Contains(","))
+ return false;
+ //if it is an int, check on next number
}
}
//if nothing is found, just say is point '.' Is not relevant
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]