EndOfLine

From Xojo Documentation
Jump to: navigation, search

Class (inherits from Object)

Returns an end-of-line terminator.


Properties
Macintosh Unix Windows


Syntax

result=EndOfLine

Part Type Description
result String The end of line String for the platform being compiled.

or
result=EndOfLine.EndOfLineType

Part Type Description
result String The end of line String specified by EndOfLineType.
EndofLineType String The end of line String being requested.

The choices are:
Windows
Macintosh
Unix

Notes

As indicated by the syntax, EndOfLine can be used in either of two ways. You can call one of its properties to get the line ending for that platform or you can call it without accessing any of its properties. In that case, it returns the EndOfLine character or character string for the platform being compiled.

Use the ReplaceLineEndings function to convert the line endings of text from one line ending to another.

EndOfLine on OS X

NOTE: Starting with 2013r1, EndOfLine returns EndOfLine.Unix on all OS X apps.  


This change was necessary because 2013r1 creates Cocoa apps by default and Cocoa works with the Unix line endings.

If you require the old behavior, you should explicitly use EndOfLine.Macintosh.

Examples

The following example specifies Unix line endings.

Dim cr As String
cr = EndOfLine.Unix
TextField1.Text = "Hello world" + cr + "Such as it is."


See Also

ReplaceLineEndings function.

Personal tools
Namespaces

Variants
Actions
Main
Documentation
Community
Toolbox
Help