EndOfLine
Class EndOfLine

Method PrototypeDescription
Function Operator_Add( rhs As String ) As Stringprepend HTTP line ending to a string
Function Operator_AddRight( lhs As String ) As Stringappend HTTP line ending to a string
Function Operator_Compare( other As String ) As Integercompare HTTP line ending to a string
Function Operator_Convert() As Stringconvert to a string as the HTTP line ending
Shared Function HTML() As Stringreturn an HTML line ending, "<br />"
Shared Function HTTP() As Stringreturn the HTTP line ending: Chr(13)+Chr(10)
Shared Function Macintosh() As Stringreturn the classic Mac line ending: Chr(13)
Shared Function Unix() As Stringreturn the Unix line ending: Chr(10)
Shared Function Windows() As Stringreturn the Windows line ending: Chr(13)+Chr(10)


Shared method:
Method PrototypeDescription
Function EndOfLine() As EndOfLinereturn the standard EndOfLine instance


The EndOfLine class represents line breaks, including all major platforms as well as line breaks used by HTTP and HTML. It includes comparison and conversion operators so that you can use it like a string (in which case it represents the HTTP line break). Or, you can explicitly call out type of line ending you want, as EndOfLine.Unix for example.

Although EndOfLine is a class, there is a global function (also called EndOfLine) that returns a static instance of that class. This means that you never need to explicitly declare and instantiate EndOfLine; instead, just refer to it via this global function, like so:

Print "Hello" + EndOfLine + "there!"
myOutputStream.Write "Line1" + EndOfLine.Unix + "Line2"

See the ReplaceLineEndings function for a convenient way to replace all line endings in a block of text.