aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-15 07:32:37 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-15 08:27:17 +0200
commitfc8358d430575a1d2d5d9a08e53b82aed8bed4a0 (patch)
tree06e9f7adf888b22b71f9e663d2e59eb47d567f70
parent9c1bef6f963d2fb8430b2302afc60630201ecc9a (diff)
downloadUstring-fc8358d430575a1d2d5d9a08e53b82aed8bed4a0.zip
Ustring-fc8358d430575a1d2d5d9a08e53b82aed8bed4a0.tar.gz
Ustring-fc8358d430575a1d2d5d9a08e53b82aed8bed4a0.tar.bz2
Add the l index in the returned array.
l is equal to j - i, where i the position of the beginning of the resulting word, j the position of the end and l is the length.
-rw-r--r--Search.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Search.php b/Search.php
index c76eecc..4eab9d1 100644
--- a/Search.php
+++ b/Search.php
@@ -88,7 +88,7 @@ class Search {
$j = $m + $d;
$i = max(0, $j - $m);
- $offset[$q][] = array('i' => $i, 'j' => $j);
+ $offset[$q][] = array('i' => $i, 'j' => $j, 'l' => $j - $i);
}
}