{"name":"endl","operator":null,"title":"endl","type":"command","url":"https://community.bistudio.com/wiki/endl","revid":325316,"updated":"2022-07-11T14:52:06Z","groups":["Strings"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.70"}],"since":{"game":"arma3","name":"Arma 3","version":"1.70"},"arma3_since":"1.70","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"String","types":["String"],"description":"line break","text":"String - line break"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\ndiag_log (\"line1\" + endl + \"line2\");\n```","code":["diag_log (\"line1\" + endl + \"line2\");"]},{"text":"```sqf\n_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];\n```","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];"]}],"multiplayer":null,"problems":null,"aliases":[],"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."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Strings","Introduced with Arma 3 version 1.70","Scripting Commands"]}