Commit 0b4b83c2553a9d4e04f6ed88f652b69d613fdd87

Authored by knodlseder
1 parent 7b87d977

strip leading and trailing whitespace in string method

Showing 1 changed file with 2 additions and 1 deletions
src/fits/GFitsHeaderCard.cpp
... ... @@ -15,6 +15,7 @@
15 15 /* __ Includes ___________________________________________________________ */
16 16 #include <iostream>
17 17 #include "GException.hpp"
  18 +#include "GTools.hpp"
18 19 #include "GFitsHeaderCard.hpp"
19 20  
20 21 /* __ Namespaces _________________________________________________________ */
... ... @@ -398,7 +399,7 @@ std::string GFitsHeaderCard::string(void)
398 399 switch (m_value_type) {
399 400 case CT_STRING:
400 401 if (m_value.length() > 2)
401   - result = m_value.substr(1, m_value.length() - 2);
  402 + result = strip_whitespace(m_value.substr(1, m_value.length() - 2));
402 403 break;
403 404 case CT_INT:
404 405 case CT_FLOAT:
... ...