76 const std::string& rMainString,
77 const std::string& rToErase
87 const std::string& rMainString,
88 const std::string& rToCheck
105 const std::string& rString,
117 const std::string& rInputString,
118 const std::string& rStringToBeReplaced,
119 const std::string& rStringToReplace
128 template<
class TClass>
130 std::ostream& rOStream,
131 const TClass& rThisClass,
132 const std::string Identation =
"\t"
136 std::stringstream ss;
138 rThisClass.PrintData(ss);
141 const std::string& r_output = ss.str();
144 std::istringstream iss(r_output);
145 while (std::getline(iss, line)) {
147 rOStream << Identation << line <<
"\n";
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
std::string ReplaceAllSubstrings(const std::string &rInputString, const std::string &rStringToBeReplaced, const std::string &rStringToReplace)
This function replaces from a string all times a certain substring is repeated.
Definition: string_utilities.cpp:163
std::string ConvertSnakeCaseToCamelCase(const std::string &rString)
Convert snake_case to CamelCase.
Definition: string_utilities.cpp:48
static void PrintDataWithIdentation(std::ostream &rOStream, const TClass &rThisClass, const std::string Identation="\t")
Prints the data of an object of type TClass to the given output stream with indentation.
Definition: string_utilities.h:129
std::vector< std::string > SplitStringByDelimiter(const std::string &rString, const char Delimiter)
This method splits a string by a delimiter.
Definition: string_utilities.cpp:144
std::string RemoveWhiteSpaces(const std::string &rString)
This method removes whitespaces.
Definition: string_utilities.cpp:127
bool ContainsPartialString(const std::string &rMainString, const std::string &rToCheck)
Checks the existence of a substring from main string.
Definition: string_utilities.cpp:105
std::string ErasePartialString(const std::string &rMainString, const std::string &rToErase)
Erase first occurrence of given substring from main string.
Definition: string_utilities.cpp:83
std::string ConvertCamelCaseToSnakeCase(const std::string &rString)
This method converts CamelCase to snake_case.
Definition: string_utilities.cpp:26
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
This namespace includes several utilities necessaries for computing string operations.