CgiUtils.h File Reference

A collection of utility functions. More...

#include <new>
#include <string>
#include <fstream>
#include "cgicc/CgiDefs.h"

Go to the source code of this file.


namespace  cgicc


#define _CGIUTILS_H_   1


bool cgicc::stringsAreEqual (const std::string &s1, const std::string &s2)
 Compare two strings for equality, ignoring case.
bool cgicc::stringsAreEqual (const std::string &ss1, const std::string &ss2, size_t n)
 Compare two strings for equality, ignoring case.
std::string cgicc::form_urldecode (const std::string &src)
 Convert an ASCII string to a URL-safe string.
std::string cgicc::form_urlencode (const std::string &src)
 Convert encoded characters in form data to normal ASCII.
std::string cgicc::charToHex (char c)
 Convert an ASCII character to its hexadecimal equivalent.
char cgicc::hexToChar (char first, char second)
 Convert a hex-encoded character to its ASCII equivalent.
std::string cgicc::extractBetween (const std::string &data, const std::string &separator1, const std::string &separator2)
 Extract a substring contained within two separators.
std::string cgicc::extractBetween (const std::string &datas, const std::string &separators)
 Extract a substring contained between a separator.
void cgicc::writeString (std::ostream &out, const std::string &s)
 Write a string to an ostream.
void cgicc::writeLong (std::ostream &out, unsigned long l)
 Write a long to an ostream.
std::string cgicc::readString (std::istream &in)
 Read a string from an istream.
unsigned long cgicc::readLong (std::istream &in)
 Read a long from an istream.

Detailed Description

A collection of utility functions.

These utility functions are used internally by cgicc to decode posted form data, and to read/write from streams.

Definition in file CgiUtils.h.

GNU cgicc - A C++ class library for writing CGI applications
Copyright © 1996 - 2004 Stephen F. Booth
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front Cover Texts, and with no Back-Cover Texts.
Documentation generated Sat Jan 19 21:15:58 2008 for cgicc by doxygen 1.5.1