19 #ifndef itkFancyString_h
20 #define itkFancyString_h
26 #include "ITKIOXMLExport.h"
54 operator=(
const std::string & str);
56 operator=(
const char * s);
59 operator const char *()
const;
76 ToData(std::vector<T> & outputData,
int count = -1);
85 FromData(
const std::vector<T> & inputData);
100 template <
typename T>
102 ToData(
Array<T> & outputData,
int count = -1);
109 template <
typename T>
111 FromData(
const Array<T> & inputData);
120 operator const std::string &()
const;
132 template <
typename T>
134 ToData(T & outputData);
140 template <
typename T>
142 FromData(
const T & inputData);
158 Trim(
const std::string & dislike =
" \t\n\r");
162 TrimLeft(
const std::string & dislike =
" \t\n\r");
166 TrimRight(
const std::string & dislike =
" \t\n\r");
178 Split(std::string & lpart, std::string & rpart,
const std::string & delims =
"=:")
const;
182 Split(std::vector<std::string> & result,
const std::string & delims =
";|")
const;
189 Split(std::map<std::string, std::string> & result,
const std::string & delims =
";|");
193 MatchWith(
const std::string & s2,
bool ignoreCase =
true);
197 StartWith(
const std::string & s2,
bool ignoreCase =
true);
201 EndWith(
const std::string & s2,
bool ignoreCase =
true);
205 ContainSub(
const std::string & s2,
bool ignoreCase =
true);
242 operator<<(FancyString & s,
void (*mf)(FancyString &));
259 template <
typename T>
261 operator>>(FancyString & s, std::vector<T> & data);
267 template <
typename T>
269 operator<<(FancyString & s,
const std::vector<T> & data);
280 template <
typename T>
288 template <
typename T>
290 operator<<(FancyString & s,
const Array<T> & data);
300 template <
typename T>
308 template <
typename T>
314 #ifndef ITK_MANUAL_INSTANTIATION
315 # include "itkFancyString.hxx"
318 #endif // itkFancyString_h