atrsimilar_tokenize

Versions
6.1
atrsimilar_tokenize($old, $new)

Tokenize the old and new strings.

▾ 1 function calls atrsimilar_tokenize()

atrsimilar_diff in atr/modules/atrsimilar/includes/atrsimilar.review.inc
Compute the differences between two strings.

Code

atr/modules/atrsimilar/includes/atrsimilar.review.inc, line 138

<?php
function atrsimilar_tokenize($old, $new) {
  $tokens = array();
  foreach(array($old, $new) as $i => $string) {
    $tokens[$i] = preg_split('/(?<=\W)|(?=\W)/u', $string);
  }

  return $tokens;
}
?>