Text_Diff::trimNewlines

Advertisement

Summery Summery

Removes trailing newlines from a line of text. This is meant to be used with array_walk().

Syntax Syntax

Text_Diff::trimNewlines( string $line, integer $key )

Parameters Parameters

$line

(Required) The line to trim.

$key

(Required) The index of the line in the array. Not used.

Source Source

File: wp-includes/Text/Diff.php

    static function trimNewlines(&$line, $key)
    {
        $line = str_replace(array("\n", "\r"), '', $line);
    }

Advertisement

Advertisement

Leave a Reply