pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2001-07-30
2001-07-30 14:59:25 by Martin Nilsson <mani@lysator.liu.se>
e6f23d138107e0e71f2afdcc2c8aaca81b8e6388 (
24
lines) (+
20
/-
4
)
[
Show
|
Annotate
]
Branch:
7.9
Fixed a few typos and added an diff_compare_table example.
Rev: src/builtin_functions.c:1.401
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
400
2001/07/
27
21
:
03
:
07
nilsson Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
401
2001/07/
30
14
:
59
:
25
nilsson Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
5264:
*! array @[a], and the second is an array of parts in array @[b]. *! *! @seealso
-
*! @[diff_compare_table()], @[diff_
longset
_sequence()],
+
*! @[diff_compare_table()], @[diff_
longest
_sequence()],
*! @[String.fuzzymatch()] */ PMOD_EXPORT void f_diff(INT32 args)
5317:
*! Returns an array which maps from index in @[a] to corresponding *! indices in @[b]. *!
+
*! @pre{
+
*! > Array.diff_compare_table( ({ "a","b","c" }), ({ "b", "b", "c", "d", "b" }));
+
*! Result: ({
+
*! ({ }),
+
*! ({
+
*! 0,
+
*! 1,
+
*! 4
+
*! }),
+
*! ({
+
*! 2
+
*! })
+
*! })
+
*! @}
+
*!
*! @seealso
-
*! @[diff()], @[diff_
longset
_sequence()], @[String.fuzzymatch()]
+
*! @[diff()], @[diff_
longest
_sequence()], @[String.fuzzymatch()]
*/ void f_diff_compare_table(INT32 args) {
5366:
*! Gives the longest sequence of indices in @[b] that have corresponding *! values in the same order in @[a]. *!
-
*! This function performs the same operation as @[diff_
longset
_sequence()],
+
*! This function performs the same operation as @[diff_
longest
_sequence()],
*! but uses a different algorithm, which in some rare cases might be faster *! (usually it's slower though). *!