diff base/RealTime.cpp @ 121:7c3e1bc51080

* RFE 1497743: Adjust layer text file format to allow copy/paste into Excel Use \t as the default separator for text file export, and remove the leading space from RealTime::toString values
author Chris Cannam
date Thu, 08 Jun 2006 11:12:47 +0000
parents fda016f64f7c
children 4b2ea82fd0ed
line wrap: on
line diff
--- a/base/RealTime.cpp	Mon May 22 10:46:43 2006 +0000
+++ b/base/RealTime.cpp	Thu Jun 08 11:12:47 2006 +0000
@@ -102,7 +102,7 @@
 }
 
 std::string
-RealTime::toString() const
+RealTime::toString(bool align) const
 {
     std::stringstream out;
     out << *this;
@@ -113,6 +113,11 @@
 
     std::string s = out.str();
 
+    if (!align && *this >= RealTime::zeroTime) {
+        // remove leading " "
+        s = s.substr(1, s.length() - 1);
+    }
+
     // remove trailing R
     return s.substr(0, s.length() - 1);
 }