30 template <
char TDelimiter = '\\',
unsigned int TMaxLength = 64,
char TPadChar = ' '>
34 GDCM_STATIC_ASSERT( TPadChar ==
' ' || TPadChar == 0 );
55 push_back( TPadChar );
63 push_back( TPadChar );
67 std::string(s, pos, n)
72 push_back( TPadChar );
77 operator const char *()
const {
return this->c_str(); }
83 if( l > TMaxLength )
return false;
89 std::string str = *
this;
90 str.resize( TMaxLength );
97 std::string str = *
this;
98 std::string::size_type pos1 = str.find_first_not_of(
' ');
99 std::string::size_type pos2 = str.find_last_not_of(
' ');
100 str = str.substr( (pos1 == std::string::npos) ? 0 : pos1,
101 (pos2 == std::string::npos) ? (str.size() - 1) : (pos2 - pos1 + 1));
106 template <
char TDelimiter,
unsigned int TMaxLength,
char TPadChar>
111 std::getline(is, ms, TDelimiter);
114 is.putback( TDelimiter );
127 #endif //GDCMSTRING_H