util Namespace Reference

Utility functions to assist with common tasks. More...


Classes

class  array
 Generic and simple array class. More...
class  variant
 A type that can store any numeric/string value and convert between them. More...

Typedefs

typedef array< unsigned char, 2 > pairchar
 Commonly used array type in EOSERV.
typedef array< unsigned char, 4 > quadchar
 Commonly used array type in EOSERV.
typedef variant var
 Alternate name for variant.

Functions

std::string ltrim (const std::string &)
 Trims whitespace from the left of a string.
std::string rtrim (const std::string &)
 Trims whitespace from the right of a string.
std::string trim (const std::string &)
 Trims whitespace from both sides of a string.
std::vector< std::string > explode (char delimiter, std::string)
 Split a string in to a vector with a specified delimiter.
double tdparse (std::string timestr)
 Parse a string time period to a number.


Detailed Description

Utility functions to assist with common tasks.


Typedef Documentation

typedef array<unsigned char, 2> util::pairchar

Commonly used array type in EOSERV.

typedef array<unsigned char, 4> util::quadchar

Commonly used array type in EOSERV.

typedef variant util::var

Alternate name for variant.


Function Documentation

std::string util::ltrim ( const std::string &   ) 

Trims whitespace from the left of a string.

Whitespace is defined as space, tab, CR and LF.

std::string util::rtrim ( const std::string &   ) 

Trims whitespace from the right of a string.

Whitespace is defined as space, tab, CR and LF.

std::string util::trim ( const std::string &   ) 

Trims whitespace from both sides of a string.

Whitespace is defined as space, tab, CR and LF.

std::vector< std::string > util::explode ( char  delimiter,
std::string  str 
)

Split a string in to a vector with a specified delimiter.

double util::tdparse ( std::string  timestr  ) 

Parse a string time period to a number.

Parameters:
timestr amount of time in a human readable format (eg. 2h30m)
Returns:
number of seconds


Generated on Sun Apr 5 20:28:34 2009 for EOServ by  doxygen 1.5.7.1