Gets the width of a range of characters.
@param startIdx the first index to calculate
@param lastIdx the last inclusive index to calculate
@return the sum of all widths
9149
public float getWidth(int startIdx, int lastIdx) {
        char c = 0;
        PdfChunk ck = null;
        float width = 0;
        for (; startIdx <= lastIdx; ++startIdx) {
            boolean surrogate = Utilities.isSurrogatePair(text, startIdx);
            if (surrogate) {
                width += detailChunks[startIdx].getCharWidth(Utilities.convertToUtf32(text, startIdx));
                ++startIdx;
            }
            else {
                c = text[startIdx];
                ck = detailChunks[startIdx];
                if (PdfChunk.noPrint(ck.getUnicodeEquivalent(c)))
                    continue;
                width += detailChunks[startIdx].getCharWidth(c);
            }
        }
        return width;
    }
1012048
private static String getDataTemplate(int[] widths) {
        return IntStream.range(0, widths.length)
                .mapToObj(i -> " %" + (i + 1) + "$" + widths[i] + "s  |")
                .reduce((left, right) -> left + " " + right)
                .orElse("");
    }
383677
private int getXForY(int newX, int newY) {

        int width = (int)Math.floor((newY - m_firstY) / m_heightToWidth);
        int result = m_firstX + width;
        if (((m_firstX - newX) * (m_firstX - result)) < 0) {
            result = m_firstX - width;
        }
        return result;
    }
535648
public int getNextRangeIndex() {
        int length = rangeIndexList.size();
        if (length > 0) {
            Integer rindex = rangeIndexList.get(length - 1);
            return rindex.intValue();
        }
        return 0;
    }
1164926
public final int pageX() {
    if (getTouches() != null && getTouches().length() > 0) {
      return getTouches().get(0).getPageX();
    } else {
      return getClientX() + GQuery.document.getScrollLeft();
    }
  }
524479
public String get(int idx)
    {
        if ( idx < 0 || idx >= parts.size() ) {
            throw new IndexOutOfBoundsException();
        }
        
        return parts.get(idx);
    }
253829
public boolean setWidths(float widths[]) {
		if (widths.length != cells.length)
			return false;
		System.arraycopy(widths, 0, this.widths, 0, cells.length);
		float total = 0;
		calculated = false;
		for (int k = 0; k < widths.length; ++k) {
			PdfPCell cell = cells[k];
			
			if (cell == null) {
				total += widths[k];
				continue;
			}
			
			cell.setLeft(total);
			int last = k + cell.getColspan();
			for (; k < last; ++k)
				total += widths[k];
			--k;
			cell.setRight(total);
			cell.setTop(0);
		}
		return true;
	}
59691
public int loadIndeces(List<RowIndexEntry> rowIndexEntries, int startIndex) {
    int updatedStartIndex = input.loadIndeces(rowIndexEntries, startIndex);

    int numIndeces = rowIndexEntries.size();
    indeces = new int[numIndeces + 1];
    int i = 0;
    for (RowIndexEntry rowIndexEntry : rowIndexEntries) {
      indeces[i] = (int) rowIndexEntry.getPositions(updatedStartIndex);
      i++;
    }
    return updatedStartIndex + 1;
  }
1058373
public int findInsertIdxByDivider(JQMListDivider d) {
        if (d == null) return -1;
        int i = findDividerIdx(d);
        if (i == -1) return -1;
        List<JQMListItem> lst = getItems();
        int rslt = i + 1;
        while (rslt < lst.size()) {
            if (lst.get(rslt) == null) { // next divider
                return rslt;
            }
            rslt++;
        }
        return rslt;
    }
18250
public int getWidth(int char1) {
        if (vertical)
            return 1000;
        if (fontSpecific) {
            if ((char1 & 0xff00) == 0 || (char1 & 0xff00) == 0xf000)
                return getRawWidth(char1 & 0xff, null);
            else
                return 0;
        }
        else {
            return getRawWidth(char1, encoding);
        }
    }
572825
Expression get( int idx ) {
        if( parameters.size() <= idx ) {
            throw new ParameterOutOfBoundsException();
        }
        return parameters.get( idx );
    }
151772
public static CellRangeAddress getMergedRegion(final Sheet sheet, final int rowIdx, final int colIdx) {
        ArgUtils.notNull(sheet, "sheet");

        final int num = sheet.getNumMergedRegions();
        for(int i=0; i < num; i ++) {
            final CellRangeAddress range = sheet.getMergedRegion(i);
            if(range.isInRange(rowIdx, colIdx)) {
                return range;
            }
        }

        return null;
    }
1135702
public int getDepth(int index) {
    if (index == 0) {
      return 0;
    } else {
      int[] parts = findSubexpression(index);
      return 1 + subexpressions.get(parts[0]).getDepth(parts[1]);
    }
  }
1349269
public Range<Integer> getCardRange(String id) {
        Preconditions.checkState(mGroupBasicAdapter != null, "Must call bindView() first");
        return this.mGroupBasicAdapter.getCardRange(id);
    }
744401
private int validated(final int idx) {
        if (idx < 0) {
            throw new IllegalArgumentException(
                String.format("Index %d must be >= 0.", idx)
            );
        }
        if (idx >= this.all.size()) {
            throw new IllegalArgumentException(
                String.format(
                    "Trying to return index %d from a list of %d passes",
                    idx,
                    this.all.size()
                )
            );
        }
        return idx;
    }
1221504
static public String intToHexString(int n, int width) {
        StringBuilder  dest = new StringBuilder(width);
        dest.append(Integer.toHexString(n));
        while (dest.length() < width) {
           dest.insert(0, ' ');
        }
        return dest.toString();
    }
329971
public int lastIndexOf(final char ch, int startIndex) {
        startIndex = (startIndex >= size ? size - 1 : startIndex);
        if (startIndex < 0) {
            return -1;
        }
        for (int i = startIndex; i >= 0; i--) {
            if (buffer[i] == ch) {
                return i;
            }
        }
        return -1;
    }