Go to the documentation of this file.
88 const char sigil =
'$'
130 const char sigil =
'$'
202 const bool allowEmpty,
203 const bool allowSubDict =
false,
204 const char sigil =
'$'
216 const std::string&
s,
218 const char sigil =
'$'
240 const char sigil =
'$'
249 string expand(
const std::string&
s,
const bool allowEmpty =
false);
267 void inplaceExpand(std::string&
s,
const bool allowEmpty =
false);
279 std::pair<size_t, size_t>
282 const std::string&
s,
284 size_t len = std::string::npos
300 string trim(
const std::string&
s);
317 string lower(
const std::string&
s);
323 string upper(
const std::string&
s);
332 template<
class StringType>
335 const StringType& str,
337 const bool keepEmpty =
false
342 template<
class StringType>
345 const StringType& str,
346 const std::string& delim,
347 const bool keepEmpty =
false
353 template<
class StringType>
356 const StringType& str,
357 const std::string& delim
366 template<
class StringType>
369 const StringType& str,
376 template<
class StringType>
379 const StringType& str
393 const std::string& str,
396 const bool escape =
false
String expression evaluation.
void inplaceTrimRight(std::string &s)
Trim trailing whitespace inplace.
A class for handling words, derived from Foam::string.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void writeWrapped(OSstream &os, const std::string &str, const std::string::size_type width, const std::string::size_type indent=0, const bool escape=false)
Output string with text wrapping.
Specialized string sorting.
void inplaceTrim(std::string &s)
Trim leading and trailing whitespace inplace.
bool inplaceReplaceVar(std::string &s, const word &varName)
Replace environment variable contents with its name.
Foam::SubStrings< StringType > split(const StringType &str, const char delim, const bool keepEmpty=false)
Split string into sub-strings at the delimiter character.
string trim(const std::string &s)
Return string trimmed of leading and trailing whitespace.
Foam::SubStrings< StringType > splitSpace(const StringType &str)
Split string into sub-strings at whitespace (TAB, NL, VT, FF, CR, SPC)
string trimLeft(const std::string &s)
Return string trimmed of leading whitespace.
Sub-ranges of a string with a structure similar to std::match_results, but without the underlying reg...
void inplaceRemoveComments(std::string &s)
Remove C/C++ comments inplace.
string expand(const std::string &s, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
void inplaceExpand(std::string &s, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
std::pair< size_t, size_t > findTrim(const std::string &s, size_t pos=0, size_t len=std::string::npos)
Find (first, last) non-space locations in string or sub-string.
Generic output stream using a standard (STL) stream.
graph_traits< Graph >::vertices_size_type size_type
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Foam::SubStrings< StringType > splitAny(const StringType &str, const std::string &delim)
Split string into sub-strings using any characters in delimiter.
string trimRight(const std::string &s)
Return string trimmed of trailing whitespace.
Ostream & indent(Ostream &os)
Indent stream.
A HashTable similar to std::unordered_map.
void inplaceLower(std::string &s)
Inplace transform string with std::tolower on each character.
Foam::SubStrings< StringType > splitFixed(const StringType &str, const std::string::size_type width, const std::string::size_type start=0)
Split string into sub-strings using a fixed field width.
void inplaceTrimLeft(std::string &s)
Trim leading whitespace inplace.
bool match(const UList< wordRe > &patterns, const std::string &text)
Return true if text matches one of the regular expressions.
Functor wrapper for matching against a List of wordRe.
void inplaceRemoveSpace(std::string &s)
Eliminate whitespace inplace.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar c
Speed of light in a vacuum.
std::string::size_type count(const std::string &s, const char c)
Count the number of occurrences of the specified character.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
string removeComments(const std::string &s)
Return string with C/C++ comments removed.
void inplaceUpper(std::string &s)
Inplace transform string with std::toupper on each character.
dimensionedScalar pos(const dimensionedScalar &ds)