nl_tokens: Performs a binary search finding the index at which value occurs in array . If no such index is found returns the 2 s - complement of first index at which number [ index ] exceeds number .
pl_tokens: function binarySearch ( array , value ) { var low = 0 ; var high = array . length - 1 ; while ( low <= high ) { var middle = low + ( ( high - low ) >> 1 ) ; var midValue = <mask> [ middle ] ; if ( midValue === value ) { return middle ; } else if ( midValue > value ) { high = middle - 1 ; } else { low = middle + 1 ; } } return ~ low ; }