code: private int findRow(int rangeStart) {
          int index = 0;
  
          // check the vicinity of the last-seen row (start
          // searching with an unrolled loop)
  
          index = prevRow * columns;
          if (rangeStart >= v[index]) {
              if (rangeStart < v[index + 1]) {
                  // same row as last seen
                  return index;
              } else {
                  index += columns;
                  if (rangeStart < v[index + 1]) {
                      ++prevRow;
                      return index;
                  } else {
                      index += columns;
                      if (rangeStart < v[index + 1]) {
                          prevRow += 2;
                          return index;
                      } else if ((rangeStart - v[index + 1]) < 10) {
                          // we are close, continue looping
                          prevRow += 2;
                          do {
                              ++prevRow;
                              index += columns;
                          } while (rangeStart >= v[index + 1]);
                          return index;
                      }
                  }
              }
          } else if (rangeStart < v[1]) {
              // the very first row
              prevRow = 0;
              return 0;
          }
  
          // do a binary search for the start of the range
          int start = 0;
          int mid = 0;
          int limit = rows;
          while (start < limit - 1) {
              mid = (start + limit) / 2;
              index = columns * mid;
              if (rangeStart < v[index]) {
                  limit = mid;
              } else if (rangeStart < v[index + 1]) {
                  prevRow = mid;
                  return index;
              } else {
                  start = mid;
              }
          }
  
          // must be found because all ranges together always cover
          // all of Unicode
          prevRow = start;
          index = start * columns;
          return index;
      }
docs: points to the start of a row.