Text_Diff::countDeletedLines

Advertisement

Summery Summery

Returns the number of deleted (removed) lines in a given diff.

Syntax Syntax

Text_Diff::countDeletedLines()

Return Return

(integer) The number of deleted lines

Source Source

File: wp-includes/Text/Diff.php

    function countDeletedLines()
    {
        $count = 0;
        foreach ($this->_edits as $edit) {
            if (is_a($edit, 'Text_Diff_Op_delete') ||
                is_a($edit, 'Text_Diff_Op_change')) {
                $count += $edit->norig();
            }
        }
        return $count;
    }

Advertisement

Changelog Changelog

Changelog
Version Description
Text_Diff 1.1.0 Introduced.

Advertisement

Leave a Reply

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