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

TextUtil Class Reference

List of all members.

Detailed Description

Class that provides text utility functions.


Static Public Member Functions

String toCrLf (String s)
 Converts to CR LF end-of-line characters.
String toLf (String s)
 Converts to LF end-of-line character.
String toLocalEol (String s)
 Converts to the default end-of-line characters.

Static Public Attributes

const char *const CRLF = CRLFmem
 Named constant for "\r\\n".
const char *const LF = LFmem
 Named constant for "\ n".
const char * EOL_CHARS = TextUtil::LF
 The library's default end-of-line characters.


Member Function Documentation

String toCrLf String  s  )  [static]
 

Converts to CR LF end-of-line characters.

Parameters:
s input string to be converted
Returns:
output string with CR LF end-of-line characters

String toLf String  s  )  [static]
 

Converts to LF end-of-line character

Parameters:
s input string to be converted
Returns:
output string with LF end-of-line characters

String toLocalEol String  s  )  [static]
 

Converts to the default end-of-line character sequence.

The value of EOL_CHARS determines end-of-line characters in the output string.

Parameters:
s input string to be converted
Returns:
output string with default end-of-line characters


Member Data Documentation

const char * EOL_CHARS = TextUtil::LF [static]
 

The library's default end-of-line characters.

The value of EOL_CHARS determines the default value for the end-of-line characters used by the library. If you change its value, you should set it to one of the constants TextUtil::CRLF or TextUtil::LF. For example, the following code:

    mimepp::TextUtil::EOL_CHARS = mimepp::TextUtil::CRLF;

will set "\r\\n" as the default end-of-line characters for the library.

The value of EOL_CHARS does not affect the way Hunny MIME++ performs parsing. The assemble() member functions of some classes use EOL_CHARS to append end-of-line characters.

EOL_CHARS is static. You must be careful when you set its value in a multithreaded environment. You should set its value from your main thread when the program begins.

The default value for EOL_CHARS is TextUtil::LF.

Copyright © 2001-2007 Hunny Software, Inc. All rights reserved.