19 #ifndef itkStringTools_h
20 #define itkStringTools_h
25 #include "ITKIOXMLExport.h"
55 template <
typename T >
56 static std::string& ToData( std::string& s, std::vector<T>& data,
int count = -1 );
63 template <
typename T >
64 static std::string& FromData( std::string& s,
const std::vector<T>& data );
79 template <
typename T >
80 static std::string& ToData( std::string& s,
Array<T>& data,
int count = -1 );
87 template <
typename T >
88 static std::string& FromData( std::string& s,
const Array<T>& data );
98 template <
typename T >
99 static std::string& ToData( std::string& s, T& data );
105 template <
typename T >
106 static std::string& FromData( std::string& s,
const T& data );
113 static std::string& Trim( std::string& str,
const std::string& dislike =
" \t\n\r" );
116 static std::string& TrimLeft( std::string& str,
const std::string& dislike =
" \t\n\r" );
119 static std::string& TrimRight( std::string& str,
const std::string& dislike =
" \t\n\r" );
122 static std::string& ToUpperCase( std::string& str );
125 static std::string& ToLowerCase( std::string& str );
128 static void Split(
const std::string& s, std::string& lpart, std::string& rpart,
const std::string& delims =
"=:" );
131 static void Split(
const std::string& s, std::vector<std::string>& result,
const std::string& delims =
";|" );
137 static void Split(
const std::string& s, std::map<std::string,std::string>& result,
const std::string& delims =
";|" );
140 static bool MatchWith(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
143 static bool StartWith(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
146 static bool EndWith(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
149 static bool ContainSub(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
154 #ifndef ITK_MANUAL_INSTANTIATION
155 #include "itkStringTools.hxx"
158 #endif // itkStringTools_h
Array class with size defined at construction time.