Class

EndOfLine


Description

Returns an end-of-line terminator.

Usage

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.

Properties

Name

Type

Read-Only

Shared

Android

String

CR

String

CRLF

String

iOS

String

LF

String

macOS

String

Native

String

UNIX

String

Windows

String

Property descriptions


EndOfLine.Android

Android As String

The Android line ending, Chr(10).

This property is read-only.

This property is shared.


EndOfLine.CR

CR As String

Carriage Return, Chr(13).

This property is read-only.

This property is shared.


EndOfLine.CRLF

CRLF As String

Carriage Return followed by Line Feed, Chr(13) + Chr(10).

This property is read-only.

This property is shared.


EndOfLine.iOS

iOS As String

The iOS (and iPadOS) line ending, Chr(10).

This property is read-only.

This property is shared.


EndOfLine.LF

LF As String

Line Feed, Chr(10).

This property is read-only.

This property is shared.


EndOfLine.macOS

macOS As String

The macOS line ending as of macOS 10.0, Chr(10).

This property is read-only.

This property is shared.


EndOfLine.Native

Native As String

The line ending supplied by the OS upon which the app is running.

This property is read-only.

This property is shared.


EndOfLine.UNIX

UNIX As String

The Unix line ending, Chr(10). This line ending is used by macOS and Linux.

This property is read-only.

This property is shared.


EndOfLine.Windows

Windows As String

The Windows line ending, Chr(13) + Chr(10).

This property is read-only.

This property is shared.

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 String.ReplaceLineEndings function to convert the line endings of text from one line ending to another.


On macos

Note

Starting with 2013r1, EndOfLine returns Unix on all macOS apps.

You can also use macOS, which is equivalent.

Sample code

The following example specifies Unix line endings.

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

Compatibility

All project types on all supported operating systems.

See also

Object parent class; String.ReplaceLineEndings function.