---
name: "endl"
type: command
status: ok
groups: ["Strings"]
arma3_since: "1.70"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/endl
revid: 325316
updated: 2022-07-11T14:52:06Z
---

# endl

*Command · Strings · Arma 3 v1.70*

## Description

Creates a string containing a line break, similar to [lineBreak](../commands/lineBreak.md) for [text](../commands/text.md). The name is inspired by c++ std::endl (**end** **l**ine).
The command returns `"\r\n"`, which contains control characters rather than printable characters:

```sqf
hint str count "\r\n";    // 4
hint str count endl;    // 2
```

The line break works for [diag_log](../commands/diag_log.md) and [ctrlSetText](../commands/ctrlSetText.md).
It does not work with the [hint](../commands/hint.md) because [hint](../commands/hint.md) interprets printable "\n" as line break instead.
Alternatively one can use [toString](../commands/toString.md) command to get other characters.

## Syntax

```sqf
endl
```

**Returns:** [String](../topics/String.md) - line break

## Examples

### Example 1

```sqf
diag_log ("line1" + endl + "line2");
```

### Example 2

```sqf
_ctrl = findDisplay 46 ctrlCreate ["RscTextMulti", -1];
_ctrl ctrlSetPosition [0,0,1,1];
_ctrl ctrlCommit 0;
_ctrl ctrlSetText format ["line1%1line2%1line3", endl];
```

## See also

[lineBreak](../commands/lineBreak.md) · [str](../commands/str.md) · [format](../commands/format.md) · [toString](../commands/toString.md) · [joinString](../commands/joinString.md) · [splitString](../commands/splitString.md) · [toArray](../commands/toArray.md)

## Community notes

**7erra** — 2020-07-15

`toArray endl` results in `[13, 10]`. `toString [13, 10]` is therefore equivalent (or at least very similar) to [endl](../commands/endl.md).

<sub>Source: [BI Community Wiki — endl](https://community.bistudio.com/wiki/endl) (revision 325316).</sub>
