API16

API16:JDocument/setLineEnd

From Joomla! Documentation

Revision as of 22:44, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Sets the line end style to Windows, Mac, Unix or a custom string. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JDocument/setLine...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Sets the line end style to Windows, Mac, Unix or a custom string.

[Edit Descripton]

Template:Description:JDocument/setLineEnd

Syntax

setLineEnd($style)
Parameter Name Default Value Description
$style $style "win", "mac", "unix" or custom string. public

Returns

void

Defined in

libraries/joomla/document/document.php

Importing

jimport( 'joomla.document.document' );

Source Body

function setLineEnd($style)
{
        switch ($style) {
                case 'win':
                        $this->_lineEnd = "\15\12";
                        break;
                case 'unix':
                        $this->_lineEnd = "\12";
                        break;
                case 'mac':
                        $this->_lineEnd = "\15";
                        break;
                default:
                        $this->_lineEnd = $style;
        }
}

[Edit See Also] Template:SeeAlso:JDocument/setLineEnd

Examples

<CodeExamplesForm />