Text_Diff::trimNewlines()public staticWP 1.0

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

Метод класса: Text_Diff{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Text_Diff::trimNewlines( $line, $key );
$line(строка) (обязательный) (передается по ссылке — &)
The line to trim.
$key(int) (обязательный)
The index of the line in the array. Not used.

Код Text_Diff::trimNewlines() WP 6.5.2

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