19 #ifndef __itkStringTools_h
20 #define __itkStringTools_h
54 template <
typename T >
55 static std::string&
ToData( std::string& s, std::vector<T>& data,
int count = -1 );
62 template <
typename T >
63 static std::string&
FromData( std::string& s,
const std::vector<T>& data );
78 template <
typename T >
79 static std::string&
ToData( std::string& s,
Array<T>& data,
int count = -1 );
86 template <
typename T >
97 template <
typename T >
98 static std::string&
ToData( std::string& s, T& data );
104 template <
typename T >
105 static std::string&
FromData( std::string& s,
const T& data );
112 static std::string&
Trim( std::string& str,
const std::string& dislike =
" \t\n\r" );
115 static std::string&
TrimLeft( std::string& str,
const std::string& dislike =
" \t\n\r" );
118 static std::string&
TrimRight( std::string& str,
const std::string& dislike =
" \t\n\r" );
121 static std::string&
ToUpperCase( std::string& str );
124 static std::string&
ToLowerCase( std::string& str );
127 static void Split(
const std::string& s, std::string& lpart, std::string& rpart,
const std::string& delims =
"=:" );
130 static void Split(
const std::string& s, std::vector<std::string>& result,
const std::string& delims =
";|" );
136 static void Split(
const std::string& s, std::map<std::string,std::string>& result,
const std::string& delims =
";|" );
139 static bool MatchWith(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
142 static bool StartWith(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
145 static bool EndWith(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
148 static bool ContainSub(
const std::string& s1,
const std::string& s2,
bool ignoreCase =
true );
153 #ifndef ITK_MANUAL_INSTANTIATION
154 #include "itkStringTools.hxx"
157 #endif // __itkStringTools_h
Array class with size defined at construction time.