19 #ifndef itkFancyString_h 20 #define itkFancyString_h 26 #include "ITKIOXMLExport.h" 57 operator const char * ()
const;
72 template <
typename T >
73 FancyString& ToData( std::vector<T>& outputData,
int count = -1 );
80 template <
typename T >
81 FancyString& FromData(
const std::vector<T>& inputData );
96 template <
typename T >
104 template <
typename T >
114 operator const std::string& ()
const;
119 const std::string& ToString()
const;
125 template <
typename T >
132 template <
typename T >
146 FancyString& Trim(
const std::string& dislike =
" \t\n\r" );
149 FancyString& TrimLeft(
const std::string& dislike =
" \t\n\r" );
152 FancyString& TrimRight(
const std::string& dislike =
" \t\n\r" );
161 void Split( std::string& lpart, std::string& rpart,
const std::string& delims =
"=:" )
const;
164 void Split( std::vector<std::string>& result,
const std::string& delims =
";|" )
const;
170 void Split( std::map<std::string,std::string>& result,
const std::string& delims =
";|" );
173 bool MatchWith(
const std::string& s2,
bool ignoreCase =
true );
176 bool StartWith(
const std::string& s2,
bool ignoreCase =
true );
179 bool EndWith(
const std::string& s2,
bool ignoreCase =
true );
182 bool ContainSub(
const std::string& s2,
bool ignoreCase =
true );
229 template <
typename T >
236 template <
typename T >
237 FancyString& operator<<( FancyString& s, const std::vector<T>& data );
248 template <
typename T >
255 template <
typename T >
256 FancyString& operator<<( FancyString& s, const Array<T>& data );
266 template <
typename T >
273 template <
typename T >
278 #ifndef ITK_MANUAL_INSTANTIATION 279 #include "itkFancyString.hxx" 282 #endif // itkFancyString_h Array class with size defined at construction time.
bool ITKIOXML_EXPORT operator!=(itk::FancyString &s, const std::string &)
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &v)
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
void ClearContent(FancyString &input)
A special string type that is used to aid I/O operations in DOM-based object readers/writers.
bool ITKIOXML_EXPORT operator==(itk::FancyString &s, const std::string &)