Hunny Software Library Reference

TextUtil.EOL Field

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

[Visual Basic]
Public Shared EOL As ByteString
[C#]
public static ByteString EOL;

Remarks

The value of TextUtil.EOL 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 readonly fields TextUtil.CRLF_EOL or TextUtil.LF_EOL. For example, the following code:

            TextUtil.EOL = TextUtil.CRLF_EOL;
            

will set CR LF as the default end-of-line characters for the library.

The value of EOL does not affect the way MIME.NET performs parsing. The Assemble() methods of some classes use EOL to append end-of-line characters.

EOL 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 is TextUtil.CRLF_EOL.

The MIME standard requires CR LF as the characters used for the end-of-line sequence. However, in the C and Unix programming environment, LF alone (frequently called "newline") is used for the end-of-line sequence. In that environment, it is common for disk I/O functions to convert to LF end-of-line sequence on input, and convert to CR LF on output. For compatibility with such an environment, MIME.NET allows you to change the default end-of-line characters. To change the default to LF alone, set this field to TextUtil.LF_EOL.

See Also

TextUtil Class | Hunny.Mime Namespace