Summery Summery
returns the number of new (added) lines in a given diff.
Syntax Syntax
Return Return
(integer) The number of new lines
Source Source
File: wp-includes/Text/Diff.php
function countAddedLines() { $count = 0; foreach ($this->_edits as $edit) { if (is_a($edit, 'Text_Diff_Op_add') || is_a($edit, 'Text_Diff_Op_change')) { $count += $edit->nfinal(); } } return $count; }
Advertisement
Changelog Changelog
Version | Description |
---|---|
Text_Diff 1.1.0 | Introduced. |