Go to the documentation of this file.
86 const std::string& str,
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& str,
218 const char sigil =
'$'
240 const char sigil =
'$'
251 const std::string& str,
252 const bool allowEmpty =
false
274 const bool allowEmpty =
false
287 std::pair<size_t, size_t>
290 const std::string&
s,
292 size_t len = std::string::npos
308 string trim(
const std::string& str);
322 string lower(
const std::string& str);
328 string upper(
const std::string& str);
337 template<
class StringType>
340 const StringType& str,
342 const bool keepEmpty =
false
347 template<
class StringType>
350 const StringType& str,
351 const std::string& delim,
352 const bool keepEmpty =
false
358 template<
class StringType>
361 const StringType& str,
362 const std::string& delim
371 template<
class StringType>
374 const StringType& str,
381 template<
class StringType>
384 const StringType& str
398 const std::string& str,
401 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 lower(const std::string &str)
Return string transformed with std::tolower on each character.
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.
std::string::size_type count(const std::string &str, const char c)
Count the number of occurrences of the specified 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.
string upper(const std::string &str)
Return string transformed with std::toupper on each character.
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.
string removeComments(const std::string &str)
Return string with C/C++ comments removed.
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.
string expand(const std::string &str, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
label ListType::const_reference const label start
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.
void inplaceUpper(std::string &s)
Inplace transform string with std::toupper on each character.
string trim(const std::string &str)
Return string trimmed of leading and trailing whitespace.
dimensionedScalar pos(const dimensionedScalar &ds)