Cantera  2.5.1
Namespaces | Macros | Functions
stringUtils.cpp File Reference

Contains definitions for string manipulation functions within Cantera. More...

#include "cantera/base/ct_defs.h"
#include "cantera/base/stringUtils.h"
#include "cantera/base/ctexceptions.h"
#include "cantera/base/ctml.h"
#include "cantera/base/utilities.h"
#include <boost/algorithm/string.hpp>
#include <sstream>
#include <cstdio>
Include dependency graph for stringUtils.cpp:

Go to the source code of this file.

Namespaces

 Cantera
 Namespace for the Cantera kernel.
 

Macros

#define SNPRINTF   snprintf
 

Functions

std::string vec2str (const vector_fp &v, const std::string &fmt="%g", const std::string &sep=", ")
 Convert a vector to a string (separated by commas) More...
 
std::string stripnonprint (const std::string &s)
 Strip non-printing characters wherever they are. More...
 
compositionMap parseCompString (const std::string &ss, const std::vector< std::string > &names=std::vector< std::string >())
 Parse a composition string into a map consisting of individual key:composition pairs. More...
 
int intValue (const std::string &val)
 Translate a string into one integer value. More...
 
doublereal fpValue (const std::string &val)
 Translate a string into one doublereal value. More...
 
doublereal fpValueCheck (const std::string &val)
 Translate a string into one doublereal value, with error checking. More...
 
std::string parseSpeciesName (const std::string &nameStr, std::string &phaseName)
 Parse a name string, separating out the phase name from the species name. More...
 
doublereal strSItoDbl (const std::string &strSI)
 Interpret one or two token string as a single double. More...
 
void tokenizeString (const std::string &oval, std::vector< std::string > &v)
 This function separates a string up into tokens according to the location of white space. More...
 
size_t copyString (const std::string &source, char *dest, size_t length)
 Copy the contents of a std::string into a char array of a given length. More...
 
std::string trimCopy (const std::string &input)
 Trim. More...
 
std::string toLowerCopy (const std::string &input)
 Convert to lower case. More...
 
bool caseInsensitiveEquals (const std::string &input, const std::string &test)
 Case insensitive equality predicate. More...
 

Detailed Description

Contains definitions for string manipulation functions within Cantera.

Definition in file stringUtils.cpp.