FACT++  1.0
std::string ofits::Key::Trim ( const std::string &  str)
inline

Definition at line 50 of file ofits.h.

References first.

Referenced by FormatComment(), and FormatKey().

51  {
52  // Trim Both leading and trailing spaces
53  const size_t first = str.find_first_not_of(' '); // Find the first character position after excluding leading blank spaces
54  const size_t last = str.find_last_not_of(' '); // Find the first character position from reverse af
55 
56  // if all spaces or empty return an empty string
57  if (std::string::npos==first || std::string::npos==last)
58  return std::string();
59 
60  return str.substr(first, last-first+1);
61  }
char str[80]
Definition: test_client.c:7
int64_t first
Size of this column in the tile.
Definition: zofits.h:26

+ Here is the caller graph for this function: