WPDev.one
Core Class

Text_Diff

class Text_Diff // Constructor: function Object() { [native code] }

General API for generating and formatting diffs - the differences between

Methods 13 methods

Method / Return Description
__construct()
void

Computes diffs between sequences of strings.

Parameters: $engine: mixed, $params: mixed
Text_Diff()
void

PHP4 constructor.

Parameters: $engine: mixed, $params: mixed
getDiff()
void

Returns the array of differences.

countAddedLines()
int

returns the number of new (added) lines in a given diff.

countDeletedLines()
int

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

reverse()
Text_Diff

Computes a reversed diff.

isEmpty()
bool

Checks for an empty diff.

lcs()
int

Computes the length of the Longest Common Subsequence (LCS).

getOriginal()
array

Gets the original set of lines.

getFinal()
array

Gets the final set of lines.

trimNewlines()
void

Removes trailing newlines from a line of text. This is meant to be used

Parameters: $line: mixed, $key: mixed
_getTempDir()
string

Determines the location of the system temporary directory.

_check()
void

Checks a diff for validity.

Parameters: $from_lines: mixed, $to_lines: mixed

Properties

Property / Type Description
$_edits
mixed
public
No description available.

Class Information

Source File
wp-includes/Text/Diff.php
Advertisement