![]() |
|
Functions | |
std::string | to_lower (const std::string &input) |
Convert a string to lower case (outputs a copy). More... | |
std::string | to_upper (const std::string &input) |
Convert a string to upper case (outputs a copy). More... | |
void | split_string (const std::string &s, char delim, Vector< std::string > &elems) |
Vector< std::string > | split_string (const std::string &s, char delim) |
template<class T > | |
std::string | to_string (T object, unsigned float_precision=8) |
Conversion functions for easily making strings (e.g. for filenames - to avoid stack smashing problems with cstrings and long filenames).
Split a string, s, into a vector of strings where ever there is an instance of delimiter (i.e. is delimiter is " " will give a list of words). Note that mutliple delimiters in a row will give empty strings. Return by value.
Split a string, s, into a vector of strings where ever there is an instance of delimiter (i.e. is delimiter is " " will give a list of words). Note that multiple delimiters in a row will give empty strings. Return by value.
References s, and split_string().
void oomph::StringConversion::split_string | ( | const std::string & | s, |
char | delim, | ||
Vector< std::string > & | elems | ||
) |
Split a string, s, into a vector of strings where ever there is an instance of delimiter (i.e. is delimiter is " " will give a list of words). Note that mutliple delimiters in a row will give empty strings.
Split a string, s, into a vector of strings where ever there is an instance of delimiter (i.e. is delimiter is " " will give a list of words). Note that multiple delimiters in a row will give empty strings.
References s, and oomph::Global_string_for_annotation::string().
Referenced by split_string().
std::string oomph::StringConversion::to_lower | ( | const std::string & | input | ) |
Convert a string to lower case (outputs a copy).
References oomph::output(), and oomph::Global_string_for_annotation::string().
Referenced by oomph::MyProblem::actions_before_newton_step(), oomph::MyProblem::final_doc(), and oomph::MyProblem::initial_doc().
std::string oomph::StringConversion::to_string | ( | T | object, |
unsigned | float_precision = 8 |
||
) |
Conversion function that should work for anything with operator<< defined (at least all basic types).
Referenced by oomph::IMRByBDF::actions_after_timestep(), oomph::MyProblem::actions_before_newton_step(), oomph::RefineableGmshTetMesh< ELEMENT >::adapt(), oomph::SumOfMatrices::add_matrix(), oomph::RefineableSolidCubicMesh< ELEMENT >::calculate_boundary_coordinate_of_node(), oomph::Problem::calculate_predictions(), check_locate_zeta(), oomph::MyProblem::check_norm_limits(), DeletionBoundary::checkBoundaryAfterParticleMoved(), oomph::GmshTetScaffoldMesh::create_mesh_from_msh_file(), DataFiles::DataFiles(), oomph::MyProblem::doc_boundaries(), oomph::MyProblem::doc_solution(), InterfaceProblem< ELEMENT, TIMESTEPPER >::doc_solution(), oomph::ElementElementConstraintElement::elem_pt(), oomph::ConstraintElement::ext_data_pt(), oomph::ConstraintElement::ext_eqn(), oomph::NodeNodeMortaringElement::fill_in_contribution_to_jacobian_mortared_nodes(), oomph::GeneralPurposeBlockPreconditioner< MATRIX >::fill_in_subsidiary_preconditioners(), WallDetailsVTKWriter::generateFileName(), oomph::TypeNames::get_type_name(), BaseVTKWriter< H >::getFileName(), oomph::ConstraintElement::lagrange_eqn(), main(), oomph::AddedMainNumberingLookup::main_to_added(), oomph::NodeOrdering::node_global_position_comparison(), oomph::NodeNodeConstraintElement::node_pt(), oomph::NodeElementSolidOnlyMortaringElement::NodeElementSolidOnlyMortaringElement(), oomph::DocInfo::number_as_string(), MortaringValidationProblem< ELEMENT, NON_MORTAR_ELEMENT >::output(), oomph::BlockPreconditioner< MATRIX >::output_blocks_to_files(), DPMBase::readRestartFile(), DPMBase::removeOldFiles(), SolidProblem< ELEMENT_TYPE >::removeOldFiles(), RotatingDrumBidisperse::RotatingDrumBidisperse(), RotatingDrumBidisperseInitialise::RotatingDrumBidisperseInitialise(), SolidProblem< ELEMENT_TYPE >::saveSolidMesh(), oomph::TLinearHeatAndElasticityElement< DIM, NNODE_1D >::scalar_name_paraview(), oomph::MultiPoissonEquations< DIM, NFIELDS >::scalar_name_paraview(), RefineableBuoyantQCrouzeixRaviartElement< DIM >::scalar_name_paraview(), oomph::RefineableBuoyantQAxisymCrouzeixRaviartElement::scalar_name_paraview(), oomph::AdvectionDiffusionEquations< DIM >::scalar_name_paraview(), oomph::AxisymAdvectionDiffusionEquations::scalar_name_paraview(), oomph::AxisymmetricNavierStokesTractionElement< ELEMENT >::scalar_name_paraview(), oomph::AxisymmetricNavierStokesEquations::scalar_name_paraview(), oomph::GeneralisedNewtonianAxisymmetricNavierStokesEquations::scalar_name_paraview(), oomph::GeneralisedNewtonianNavierStokesEquations< DIM >::scalar_name_paraview(), oomph::FiniteElement::scalar_name_paraview(), oomph::BuoyantQCrouzeixRaviartElement< DIM >::scalar_name_paraview(), oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::scalar_name_paraview(), oomph::NavierStokesEquations< DIM >::scalar_name_paraview(), oomph::VorticitySmootherElement< ELEMENT >::scalar_name_paraview(), oomph::SpaceTimeNavierStokesEquations< DIM >::scalar_name_paraview(), oomph::SpaceTimeNavierStokesMixedOrderEquations< DIM >::scalar_name_paraview(), DPMBase::setName(), DPMBase::setNumberOfOMPThreads(), ClosedCSCStats::setupInitialConditions(), CSCStats::setupInitialConditions(), ShearStage::ShearStage(), SheetGlueProblem< ELEMENT >::SheetGlueProblem(), oomph::Time::time(), oomph::EBDF3::timestep(), DPMBase::writePythonFileForVTKVisualisation(), SolidProblem< ELEMENT_TYPE >::writeToVTK(), and VTKData::writeVTKData().
std::string oomph::StringConversion::to_upper | ( | const std::string & | input | ) |
Convert a string to upper case (outputs a copy).
References oomph::output(), and oomph::Global_string_for_annotation::string().