{"name":"endl","title":"endl","type":"command","url":"https://community.bistudio.com/wiki/endl","revid":325316,"updated":"2022-07-11T14:52:06Z","groups":["Strings"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Creates a string containing a line break, similar to lineBreak for text. The name is inspired by c++ std::endl (**end** **l**ine).\nThe command returns `\"\\r\\n\"`, which contains control characters rather than printable characters:\n\n```sqf\nhint str count \"\\r\\n\";    // 4\nhint str count endl;    // 2\n```\n\nThe line break works for diag_log and ctrlSetText.\nIt does not work with the hint because hint interprets printable \"\\n\" as line break instead.\nAlternatively one can use toString command to get other characters.","syntaxes":[{"syntax":"endl","params":[],"returns":{"type":"String","type_expr":"String","description":"line break"},"form":"nullary"}],"examples":[{"code":["diag_log (\"line1\" + endl + \"line2\");"]},{"code":["_ctrl = findDisplay 46 ctrlCreate [\"RscTextMulti\", -1];\n_ctrl ctrlSetPosition [0,0,1,1];\n_ctrl ctrlCommit 0;\n_ctrl ctrlSetText format [\"line1%1line2%1line3\", endl];"]}],"see_also":["lineBreak","str","format","toString","joinString","splitString","toArray"],"notes":[{"user":"7erra","date":"2020-07-15T11:50:00Z","text":"`toArray endl` results in `[13, 10]`. `toString [13, 10]` is therefore equivalent (or at least very similar) to endl."}]}