StringManipulation Class Reference

A set of functions to manipulate strings. More...

#include <StringManipulation.h>

List of all members.

Static Public Member Functions

static string toAllUpper (string &s)
 Converts a string to all upper case.
static string toAllLower (string &s)
 Converts a string to all lower case.
static string toFirstUpperRestLower (string &s)
 Capitalizes the first letter and lowers all others in a string.
static char toUpperChar (char c)
 Makes a character upper case.
static char toLowerChar (char c)
 Makes a character lower case.
static string intToString (int i)
 Returns a string representation of an integer.
static string intToHexString (int i)
 Returns a hexadecimal string representation of an integer.
static string doubleToString (double d)
 Returns a string representation of a double.
static string fancyDoubleToString (int sigFig, int width, double d)
 Returns a string representation of a double.
static string longToString (long l)
 Returns a string representation of a long.
static int stringToInt (string &s)
 Returns an int representation of a string.
static long stringToLong (string &s)
 Returns a long representation of a string.
static int hexstringToInt (string &s)
 Returns an representation of a hexadecimal string.
static double stringToDouble (string &s)
 Returns an double representation of a string.


Detailed Description

A set of functions to manipulate strings.

Definition at line 33 of file StringManipulation.h.


Member Function Documentation

string StringManipulation::toAllUpper ( string &  s  )  [static]

Converts a string to all upper case.

Parameters:
s a string

Definition at line 19 of file StringManipulation.cpp.

References toUpperChar().

Referenced by QMCMolecule::readPsuedoPotential().

string StringManipulation::toAllLower ( string &  s  )  [static]

Converts a string to all lower case.

Parameters:
s a string

Definition at line 34 of file StringManipulation.cpp.

References toLowerChar().

Referenced by type_to_xyz().

string StringManipulation::toFirstUpperRestLower ( string &  s  )  [static]

Capitalizes the first letter and lowers all others in a string.

Parameters:
s a string

Definition at line 50 of file StringManipulation.cpp.

References toLowerChar(), and toUpperChar().

Referenced by operator>>(), QMCThreeBodyCorrelationFunctionParameters::read(), and QMCCorrelationFunctionParameters::read().

char StringManipulation::toUpperChar ( char  c  )  [static]

Makes a character upper case.

Parameters:
c a character

Definition at line 73 of file StringManipulation.cpp.

Referenced by toAllUpper(), and toFirstUpperRestLower().

char StringManipulation::toLowerChar ( char  c  )  [static]

Makes a character lower case.

Parameters:
c a character

Definition at line 108 of file StringManipulation.cpp.

Referenced by toAllLower(), and toFirstUpperRestLower().

string StringManipulation::intToString ( int  i  )  [static]

string StringManipulation::intToHexString ( int  i  )  [static]

Returns a hexadecimal string representation of an integer.

Parameters:
i an integer.

Definition at line 154 of file StringManipulation.cpp.

Referenced by XMLElement::unicodeError().

string StringManipulation::doubleToString ( double  d  )  [static]

Returns a string representation of a double.

Parameters:
d a double.

Definition at line 166 of file StringManipulation.cpp.

Referenced by XMLElement::setAttribute().

string StringManipulation::fancyDoubleToString ( int  sigFig,
int  width,
double  d 
) [static]

Returns a string representation of a double.

Parameters:
d a double.

Definition at line 178 of file StringManipulation.cpp.

Referenced by Williamson2CorrelationFunction::print(), and Anderson2CorrelationFunction::print().

string StringManipulation::longToString ( long  l  )  [static]

Returns a string representation of a long.

Parameters:
l a long.

Definition at line 212 of file StringManipulation.cpp.

Referenced by operator<<().

int StringManipulation::stringToInt ( string &  s  )  [static]

Returns an int representation of a string.

Parameters:
s a string.

Definition at line 224 of file StringManipulation.cpp.

Referenced by XMLElement::getIntAttribute(), and XMLElement::resolveEntity().

long StringManipulation::stringToLong ( string &  s  )  [static]

Returns a long representation of a string.

Parameters:
s a string.

Definition at line 232 of file StringManipulation.cpp.

int StringManipulation::hexstringToInt ( string &  s  )  [static]

Returns an representation of a hexadecimal string.

Parameters:
s a string.

Definition at line 240 of file StringManipulation.cpp.

Referenced by XMLElement::resolveEntity().

double StringManipulation::stringToDouble ( string &  s  )  [static]

Returns an double representation of a string.

Parameters:
s a string.

Definition at line 248 of file StringManipulation.cpp.

Referenced by XMLElement::getDoubleAttribute().


The documentation for this class was generated from the following files:

Generated on Sat Jul 5 16:14:07 2008 for QMcBeaver by  doxygen 1.5.6