[ PHPXref.com ] [ Generated: Tue Jul 29 09:36:16 2008 ] [ Phorum 5.2.8 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/include/ -> diff_patch.php (summary)

(no description)

File Size: 268 lines (9 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions

  phorum_diff()
  phorum_diff_match()
  phorum_patch()
  phorum_unpatch()
  phorum_unpatch_color()

Functions
Functions that are not part of a class:

phorum_diff($a, $b, $min=3, $i=0)   X-Ref
Calculate the differences between two strings.
$a: Initial string
$b: Changed string
$min: (optional) minum match length
return: array of changes


phorum_diff_match($a, $b, $level="line")   X-Ref
Find the longest match between two strings.
The time limit must be turned off for this function.
With short strings - you won't notice.
With long strings, you will easily timeout in 30 seconds (PHP default).
If you know you won't timeout and do not like turning it off, just remove
the "set_time_limit(0)" line.


phorum_patch($text, $diff)   X-Ref
Patch a string with changes.
$text: Initial string
$diff: Change or array of Changes
return: Patched string


phorum_unpatch($text, $diff)   X-Ref
Undo patched changes to a string.
$text: Final string
$diff: Changes that were applied
return: Unpatched string


phorum_unpatch_color($text, $diff)   X-Ref
Undo patched changes to a string.
$text: Final string
$diff: Changes that were applied
return: Unpatched string




[ Powered by PHPXref - Served by Debian GNU/Linux ]