69 template<
class String>
72 for (const_iterator iter = str.begin(); iter != str.end(); ++iter)
74 if (!String::valid(*iter))
83 template<
class String>
86 if (!valid<String>(str))
89 iterator iter2 = str.begin();
93 const_iterator iter1 = iter2;
94 iter1 !=
const_cast<const string&
>(str).end();
100 if (String::valid(c))
117 template<
class String>
121 for (const_iterator iter = str.begin(); iter != str.end(); ++iter)
123 if (quote && *iter == quote)
131 else if (String::meta(*iter))
140 template<
class String>
150 sQuoted.reserve(2*str.length());
153 for (const_iterator iter = str.begin(); iter != str.end(); ++iter)
163 else if (String::meta(*iter))
171 sQuoted.resize(sQuoted.length());
177 template<
class String>
181 stripInvalid<String>(ss);
188 return (str == *
this);
210 inline unsigned Foam::string::hash::operator()
216 return Hasher(key.data(), key.size(), seed);
static bool meta(const string &, const char quote='\\')
Does this string have particular meta-characters?
string operator()(const size_type i, const size_type n) const
Return the sub-string from the i-th character for n characters.
static String validate(const string &)
Return a valid String from the given string.
bool match(const std::string &) const
True when strings match literally.
static string quotemeta(const string &, const char quote='\\')
Return a String with quoted meta-characters from the given string.
graph_traits< Graph >::vertices_size_type size_type
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
const dimensionedScalar c
Speed of light in a vacuum.
static bool valid(const string &)
Is this string type valid?
static bool stripInvalid(string &)
Strip invalid characters from the given string.
A class for handling character strings derived from std::string.