Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

stringutils.cpp File Reference


Functions

int getCharInString (const char *str, const char *characters, int max)
int getEndLine (const char *str, int max)
const char * getGMTLogFormatDate (const time_t t, char *out, int len)
const char * getGMTLogFormatDate (string &out, int len)
const char * getGMTLogFormatDate (const time_t t, string &out, int len)
const char * getGMTLogFormatDate (char *out, int len)
const char * getLocalLogFormatDate (const time_t t, char *out, int len)
const char * getLocalLogFormatDate (string &out, int len)
const char * getLocalLogFormatDate (const time_t t, string &out, int len)
const char * getLocalLogFormatDate (char *out, int len)
const char * getRFC822GMTTime (const time_t ltime, char *out, int)
const char * getRFC822GMTTime (char *out, int len)
const char * getRFC822GMTTime (const time_t t, string &out, int len)
const char * getRFC822GMTTime (string &out, int len)
const char * getRFC822LocalTime (const time_t ltime, char *out, int)
const char * getRFC822LocalTime (char *out, int len)
const char * getRFC822LocalTime (const time_t t, string &out, int len)
const char * getRFC822LocalTime (string &out, int len)
time_t getTime (const char *str)
void gotoNextLine (char **cmd)
int hexToInt (const char *str)
int hexVal (char ch)
int stringcmp (string const &a, const char *b)
int stringcmp (const string &a, const string &b)
int stringcmpi (string const &a, const char *b)
int stringcmpi (string const &a, string const &b)
void StrTrim (char *str, char *trimchars)
char * strupr (char *s)
void translateEscapeString (string &str)
void translateEscapeString (char *str)
string trim (string const &s, string const &t)
string trimLeft (string const &s, string const &t)
string trimRight (string const &s, string const &t)

Function Documentation

int getCharInString const char *  str,
const char *  characters,
int  max
 

Get the offset from string start of a character.

int getEndLine const char *  str,
int  max
 

Get the offset from string start of the first or
. Returns -1 on errors.

const char* getGMTLogFormatDate const time_t  t,
char *  out,
int  len
 

Get a string in the format "day/month/year:hour:minute:second offset" for the GMT zone.

const char* getGMTLogFormatDate string &  out,
int  len
 

Get the GMT time string.

const char* getGMTLogFormatDate const time_t  t,
string &  out,
int  len
 

Get the GMT time string.

const char* getGMTLogFormatDate char *  out,
int  len
 

Get the GMT time string.

const char* getLocalLogFormatDate const time_t  t,
char *  out,
int  len
 

Get a string in the format "day/month/year:hour:minute:second offset" for the local zone.

const char* getLocalLogFormatDate string &  out,
int  len
 

Get the local time string.

const char* getLocalLogFormatDate const time_t  t,
string &  out,
int  len
 

Get the local time string.

const char* getLocalLogFormatDate char *  out,
int  len
 

Get the local time string.

const char* getRFC822GMTTime const time_t  ltime,
char *  out,
int 
 

This function formats a time to the RFC 822 format.

const char* getRFC822GMTTime char *  out,
int  len
 

This function format current time to the RFC 822 format.

const char* getRFC822GMTTime const time_t  t,
string &  out,
int  len
 

This function format current time to the RFC 822 format and output it to a string.

const char* getRFC822GMTTime string &  out,
int  len
 

This function format current time to the RFC 822 format and output it to a string.

const char* getRFC822LocalTime const time_t  ltime,
char *  out,
int 
 

This function formats a time to the RFC 822 format.

const char* getRFC822LocalTime char *  out,
int  len
 

This function format current time to the RFC 822 format.

const char* getRFC822LocalTime const time_t  t,
string &  out,
int  len
 

This function format current time to the RFC 822 format and output it to a string.

const char* getRFC822LocalTime string &  out,
int  len
 

This function format current time to the RFC 822 format and output it to a string.

time_t getTime const char *  str  ) 
 

This function convert from a RFC 822 format to a time_t.

void gotoNextLine char **  cmd  ) 
 

Set the buffer passed to the next line. A new line is the first character after
.

int hexToInt const char *  str  ) 
 

Convert from an hex string to an int

int hexVal char  ch  ) 
 

This function converts a hexadecimal number to a decimal number.

int stringcmp string const &  a,
const char *  b
 

Compares two strings and returns a value indicating their relationship. This function values the strings case too. Returns = 0 if [A] is identical to [B]. Returns < 0 if [A] is less than [B]. Returns > 0 if [A] is greater than [B].

int stringcmp const string &  a,
const string &  b
 

Compares two strings and returns a value indicating their relationship. This function values the strings case too. Returns = 0 if [A] is identical to [B]. Returns < 0 if [A] is less than [B]. Returns > 0 if [A] is greater than [B].

int stringcmpi string const &  a,
const char *  b
 

Compares two strings and returns a value indicating their relationship. This function ignores case. Returns = 0 if [A] is identical to [B]. Returns < 0 if [A] is less than [B]. Returns > 0 if [A] is greater than [B].

int stringcmpi string const &  a,
string const &  b
 

Compares two strings and returns a value indicating their relationship. This function ignores case. Returns = 0 if [A] is identical to [B]. Returns < 0 if [A] is less than [B]. Returns > 0 if [A] is greater than [B].

void StrTrim char *  str,
char *  trimchars
 

This funtions takes two strings, first the str we're going to work on, and second a list of characters that the funtion is going to remove from the head and tail of the first string. Ex: char str[16]="Hellow World!!!"; char trim[7]="e!HlwW"; StrTrim(str,trim); result: str="ow World" 'w', 'W' and the last 'l' aren't removed because they aren't attached to the head or tail of the string

char* strupr char *  s  ) 
 

void translateEscapeString string &  str  ) 
 

Translates HTTP escape sequences.

void translateEscapeString char *  str  ) 
 

Translates HTTP escape sequences.

string trim string const &  s,
string const &  t
 

Trim a string.

string trimLeft string const &  s,
string const &  t
 

Trim a string from the left side.

string trimRight string const &  s,
string const &  t
 

Trim a string from the right side.


Generated on Thu May 1 12:40:59 2008 for MyServer by  doxygen 1.3.9.1