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

(string) (Required) The line to trim.

$key

(integer) (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

This site uses Akismet to reduce spam. Learn how your comment data is processed.