Go to the documentation of this file.
63 template<
class String>
66 for (const_iterator iter = str.begin(); iter != str.end(); ++iter)
68 if (!String::valid(*iter))
77 template<
class String>
80 if (!valid<String>(str))
83 iterator iter2 = str.begin();
87 const_iterator iter1 = iter2;
88 iter1 !=
const_cast<const string&
>(str).end();
111 template<
class String>
115 for (const_iterator iter = str.begin(); iter != str.end(); ++iter)
117 if (quote && *iter == quote)
125 else if (String::meta(*iter))
134 template<
class String>
144 sQuoted.reserve(2*str.length());
147 for (const_iterator iter = str.begin(); iter != str.end(); ++iter)
157 else if (String::meta(*iter))
165 sQuoted.resize(sQuoted.length());
171 template<
class String>
175 stripInvalid<String>(ss);
182 return (str == *
this);
204 inline unsigned Foam::string::hash::operator()
210 return Hasher(key.data(), key.size(), seed);
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
A class for handling character strings derived from std::string.
static String validate(const string &)
Return a valid String from the given string.
bool match(const std::string &) const
True when strings match literally.
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 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
static bool stripInvalid(string &)
Strip invalid characters from the given string.
const dimensionedScalar c
Speed of light in a vacuum.
static bool valid(const string &)
Is this string type valid?
static bool meta(const string &, const char quote='\\')
Does this string have particular meta-characters?