51 for (const_iterator iter = begin(); iter != end(); ++iter)
72 if ((newStart = find(oldStr, newStart)) != npos)
74 std::string::replace(newStart, oldStr.size(), newStr);
92 while ((newStart = find(oldStr, newStart)) != npos)
94 std::string::replace(newStart, oldStr.size(), newStr);
95 newStart += newStr.size();
112 bool changed =
false;
115 iterator iter2 = begin();
117 char cPrev = operator[](0) + 1;
121 string::const_iterator iter1 = iter2;
128 if (c == cPrev && c == character)
156 bool changed =
false;
159 if (n >= 1 &&
operator[](n - 1) == character)
171 string result(*
this);
179 bool changed =
false;
182 if (n >= str.size() &&
operator()(n - nStr, nStr) == str)
194 string result(*
this);
bool removeRepeated(const char)
Remove repeated characters returning true if string changed.
size_type count(const char) const
Count and return the number of a given character in the string.
string & replaceAll(const string &oldStr, const string &newStr, size_type start=0)
Replace all occurrences of sub-string oldStr with newStr.
string operator()(const size_type i, const size_type n) const
Return the sub-string from the i-th character for n characters.
const dimensionedScalar & c
Speed of light in a vacuum.
static const char *const typeName
int debugSwitch(const char *name, const int defaultValue=0)
Lookup debug switch or add default value.
triSurfaceToAgglom resize(surfacesMesh.size())
graph_traits< Graph >::vertices_size_type size_type
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static const string null
An empty string.
string & replace(const string &oldStr, const string &newStr, size_type start=0)
Replace first occurrence of sub-string oldStr with newStr.
string & inplaceExpand(string &, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
Inplace expand occurrences of variables according to the mapping.
string & expand(const bool allowEmpty=false)
Expand initial tildes and all occurrences of environment variables.
bool removeTrailing(const char)
Remove trailing character returning true if string changed.
A class for handling character strings derived from std::string.