Pike v8.1 release 6

Method Array.diff_compare_table()


Method diff_compare_table

array(array(int)) diff_compare_table(array a, array b)

Description

Returns an array which maps from index in a to corresponding indices in b.

 > Array.diff_compare_table( ({ "a","b","c" }), ({ "b", "b", "c", "d", "b" }));
 Result: ({
             ({ }),
             ({
                 0,
                 1,
                 4
             }),
             ({
                 2
 	        })
         })
 

See also

diff(), diff_longest_sequence(), String.fuzzymatch()