Main Page   Namespace List   File List   File Members  

libstring.h File Reference

#include <string>
#include <stl_pair.h>

Include dependency graph for libstring.h:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  std

Functions

bool CompareNoCase (const string &string1, const string &string2)
 compares string1 to string2 without regard to case */.

string ToUpper (string::iterator start, string::iterator stop)
 changes the case of the given string.

string ToLower (string::iterator start, string::iterator stop)
int ParseInt (const string &string1)
 parses the string and returns the {int, float} within.

float ParseFloat (const string &string1)
int stoi (const string &rhs)
 aliases to ParseInt and ParseFloat respectively.

float stof (const string &rhs)
string ReadFile (string &strIn, const string &filename)
 read all of {filename, is} into strIn and return strIn.

string ReadFile (string &strIn, istream &is)
string itos (const int n)
 converts an int or float into its string.

string ftos (const double n, const int precision=4)
string EatWhite (string::iterator start, string::iterator stop)
 remove all white space from given string.

string Trim (string::iterator start, string::iterator stop)
 trim white space from all, right, or left of given string.

string RTrim (string::iterator start, string::iterator stop)
string LTrim (string::iterator start, string::iterator stop)
pair<string, string> Split (const string &strIn, const string &delim)
 split strIn into a pair of strings based on but not including the delim.

string Space (size_t n=1)
 return n spaces.

bool IsAllSpace (string::iterator start, string::iterator stop)
 tests to see if all the string is made of is white space.

List GetListItems (const string &strList, const string &delimiter=string(","))
 given a string list separated by delimiters, return the list of all the items in the list.


Function Documentation

bool CompareNoCase ( const string & string1,
const string & string2 )
 

compares string1 to string2 without regard to case */.

string EatWhite ( string::iterator start,
string::iterator stop )
 

remove all white space from given string.

List GetListItems ( const string & strList,
const string & delimiter = string(", ") )
 

given a string list separated by delimiters, return the list of all the items in the list.

bool IsAllSpace ( string::iterator start,
string::iterator stop )
 

tests to see if all the string is made of is white space.

string LTrim ( string::iterator start,
string::iterator stop )
 

float ParseFloat ( const string & string1 )
 

int ParseInt ( const string & string1 )
 

parses the string and returns the {int, float} within.

string RTrim ( string::iterator start,
string::iterator stop )
 

string ReadFile ( string & strIn,
istream & is )
 

string ReadFile ( string & strIn,
const string & filename )
 

read all of {filename, is} into strIn and return strIn.

string Space ( size_t n = 1 )
 

return n spaces.

pair< string, string > Split<string, string> ( const string & strIn,
const string & delim )
 

split strIn into a pair of strings based on but not including the delim.

string ToLower ( string::iterator start,
string::iterator stop )
 

string ToUpper ( string::iterator start,
string::iterator stop )
 

changes the case of the given string.

string Trim ( string::iterator start,
string::iterator stop )
 

trim white space from all, right, or left of given string.

string ftos ( const double n,
const int precision = 4 )
 

string itos ( const int n )
 

converts an int or float into its string.

float stof ( const string & rhs )
 

int stoi ( const string & rhs )
 

aliases to ParseInt and ParseFloat respectively.


Generated at Thu Apr 5 22:00:05 2001 for libstring by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001