MIME++ Utility Functions

## NAME

MIME++ Utilities

## SYNOPSIS

    #include &ltmimepp/mimepp.h>

    void DwInitialize();
    int DwToCrLfEol(const DwString& aSrcStr, DwString& aDestStr);
    int DwToLfEol(const DwString& aSrcStr, DwString& aDestStr);
    int DwToCrEol(const DwString& aSrcStr, DwString& aDestStr);
    int DwToLocalEol(const DwString& aSrcStr, DwString& aDestStr);
    int DwEncodeBase64(const DwString& aSrcStr, DwString& aDestStr);
    int DwDecodeBase64(const DwString& aSrcStr, DwString& aDestStr);
    int DwEncodeQuotedPrintable(const DwString& aSrcStr, DwString& aDestStr);
    int DwEncodeQuotedPrintable(const DwString& aSrcStr, DwString& aDestStr);

## DESCRIPTION

void DwInitialize();

Initializes the class library. Call this member function before creating any objects from MIME++ classes.

int DwToCrLfEol(const DwString& aSrcStr, DwString& aDestStr);

Converts all end-of-line markers in `aSrcStr` to CR LF and puts the result in `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.

int DwToLfEol(const DwString& aSrcStr, DwString& aDestStr);

Converts all end-of-line markers in `aSrcStr` to LF ('\n') and puts the result in `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.

int DwToCrEol(const DwString& aSrcStr, DwString& aDestStr);

Converts all end-of-line markers in `aSrcStr` to CR ('\r') and puts the result in `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.

int DwToLocalEol(const DwString& aSrcStr, DwString& aDestStr);

Converts all end-of-line markers in `aSrcStr` to the end-of-line marker native to the operating system and puts the result in `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.

The end-of-line markers for various operating systems are the following:

       MS-DOS, WIN32     CR LF
       UNIX              LF
       Macintosh         CR

int DwEncodeBase64(const DwString& aSrcStr, DwString& aDestStr);

Encodes the characters in `aSrcStr` using the base64 encoding and puts the result into `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.

int DwDecodeBase64(const DwString& aSrcStr, DwString& aDestStr);

Decodes the characters in `aSrcStr` from the base64 encoding and puts the result into `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.

int DwEncodeQuotedPrintable(const DwString& aSrcStr, DwString& aDestStr);

Encodes the characters in `aSrcStr` using the quoted-printable encoding and puts the result into `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.

int DwDecodeQuotedPrintable(const DwString& aSrcStr, DwString& aDestStr);

Decodes the characters in `aSrcStr` from the quoted-printable encoding and puts the result into `aDestStr`. The contract explicitly allows `aSrcStr` and `aDestStr` to be references to the same string.