Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

url_encode.h File Reference


Detailed Description

provides routines for encoding strings according to RFC-2396.

This is typically used to constructing strings that don't have spaces or other special characters, and can be safely used as file names, URLs, or other identifiers where special characters are not allowed.

Go to the source code of this file.

Functions

void url_encode (const char *source, char *target, int length)
 Encodes a plain ASCII string into the percent-hex form of RFC 2396.
void url_decode (const char *source, char *target, int length)
 Decodes an RFC 2396 string into plain ASCII.


Function Documentation

void url_encode const char *  source,
char *  target,
int  length
 

Encodes a plain ASCII string into the percent-hex form of RFC 2396.

For example, the string Let's go becomes Let%27s%20go. Typically used to encode URLs and Chirp file names.

Parameters:
source The plain ASCII input string.
target The location of the encoded output string.
length The size in bytes of the output string space.
See also:
url_decode

void url_decode const char *  source,
char *  target,
int  length
 

Decodes an RFC 2396 string into plain ASCII.

For example, the string Let%27s%20go becomes Let's go. Typically used to decode URLs and Chirp file names.

Parameters:
source The plain ASCII input string.
target The location of the encoded output string.
length The size in bytes of the output string space.
See also:
url_encode


Generated on Thu Jul 2 15:49:25 2009 for cctools by  doxygen 1.3.9.1