stringUtils.cpp File Reference

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

#include "ct_defs.h"
#include "stringUtils.h"
#include "ctexceptions.h"
#include "global.h"
#include "ctml.h"
#include <string>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cctype>
Include dependency graph for stringUtils.cpp:

Go to the source code of this file.

Namespaces

namespace  Cantera
 

Namespace for the Cantera kernel.


Defines

#define SNPRINTF   snprintf

Functions

std::string fp2str (const double x, const std::string &fmt)
 Convert a double into a c++ string.
std::string fp2str (const double x)
 Convert a double into a c++ string.
std::string int2str (const int n, const std::string &fmt)
 Convert an int to a string using a format converter.
std::string int2str (const int n)
 Convert an int to a string.
std::string lowercase (const std::string &s)
 Cast a copy of a string to lower case.
std::string stripws (const std::string &s)
 Strip the leading and trailing white space from a string.
std::string stripnonprint (const std::string &s)
 Strip non-printing characters wherever they are.
void parseCompString (const std::string &ss, Cantera::compositionMap &x)
 Parse a composition string into a map consisting of individual key:composition pairs.
void split (const std::string &ss, std::vector< std::string > &w)
 Parse a composition string into individual key:composition pairs.
int fillArrayFromString (const std::string &str, doublereal *const a, const char delim= ' ')
 Interpret a string as a list of floats, and convert it to a vector of floats.
std::string getBaseName (const std::string &fullPath)
 Get the file name without the path or extension.
int intValue (std::string val)
 Translate a string into one integer value.
doublereal fpValue (std::string val)
 Translate a string into one doublereal value.
doublereal fpValueCheck (std::string val)
 Translate a string into one doublereal value.
std::string logfileName (const std::string &infile)
 Generate a logfile name based on an input file name.
std::string wrapString (const std::string &s, const int len=70)
 Line wrap a string via a copy operation.
int stripLTWScstring (char str[])
 Routine strips off white space from a c character string.
doublereal atofCheck (const char *const dptr)
 Translate a char string into a single double.
doublereal strSItoDbl (const std::string &strSI)
 Interpret one or two token string as a single double.
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.

Detailed Description

Contains definitions for string manipulation functions within Cantera.

Definition in file stringUtils.cpp.

Generated by  doxygen 1.6.3