Go to the documentation of this file.
60 template<
class T1,
class T2>
class Tuple2;
82 template<
class StringType,
class UnaryPredicate>
85 const StringType& str,
86 const UnaryPredicate& meta,
87 const char quote =
'\\'
98 const char sigil =
'$'
140 const char sigil =
'$'
212 const bool allowEmpty,
213 const bool allowSubDict =
false,
214 const char sigil =
'$'
226 const std::string&
s,
228 const char sigil =
'$'
250 const char sigil =
'$'
259 string expand(
const std::string&
s,
const bool allowEmpty =
false);
277 void inplaceExpand(std::string&
s,
const bool allowEmpty =
false);
287 template<
class StringType,
class UnaryPredicate>
290 const std::string& str,
291 const UnaryPredicate& accept,
297 std::pair<size_t, size_t>
300 const std::string&
s,
302 size_t len = std::string::npos
318 string trim(
const std::string&
s);
335 string lower(
const std::string&
s);
341 string upper(
const std::string&
s);
366 const std::string& str,
374 template<
class StringType>
377 const StringType& str,
379 const bool keepEmpty =
false
384 template<
class StringType>
387 const StringType& str,
388 const std::string& delim,
389 const bool keepEmpty =
false
395 template<
class StringType>
398 const StringType& str,
399 const std::string& delim
408 template<
class StringType>
411 const StringType& str,
418 template<
class StringType>
421 const StringType& str
435 const std::string& str,
438 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.
labelList invert(const label len, const labelUList &map)
Create an inverse one-to-one mapping.
void inplaceExpand(std::string &s, const HashTable< string > &mapping, const char sigil='$')
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
StringType quotemeta(const StringType &str, const UnaryPredicate &meta, const char quote='\\')
Quote any meta-characters in given string.
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.
OBJstream os(runTime.globalPath()/outputName)
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 array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A List of wordRe with additional matching capabilities.
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.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
StringType validate(const std::string &str, const UnaryPredicate &accept, const bool invert=false)
Return a copy of the input string with validated characters.
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.
string expand(const std::string &s, const HashTable< string > &mapping, const char sigil='$')
Foam::argList args(argc, argv)
label splitFunctionArgs(const std::string &str, wordRes &args, List< Tuple2< word, string >> &namedArgs)
Split out arguments (named or unnamed) from an input string.
dimensionedScalar pos(const dimensionedScalar &ds)