MCPcopy Index your code
hub / github.com/libgdx/libgdx / insertRange

Method insertRange

gdx/src/com/badlogic/gdx/utils/CharArray.java:1554–1560  ·  view source on GitHub ↗

Inserts the specified number of items at the specified index. The new items will have values equal to the values at those indices before the insertion.

(int index, int count)

Source from the content-addressed store, hash-verified

1552 /** Inserts the specified number of items at the specified index. The new items will have values equal to the values at those
1553 * indices before the insertion. */
1554 public void insertRange (int index, int count) {
1555 validateIndex(index);
1556 int sizeNeeded = size + count;
1557 if (sizeNeeded > items.length) items = resize(Math.max(Math.max(8, sizeNeeded), (int)(size * 1.75f)));
1558 System.arraycopy(items, index, items, index + count, size - index);
1559 size = sizeNeeded;
1560 }
1561
1562 /** Inserts the character array into this CharArray. Inserting null will use {@code "null"}.
1563 * @throws IndexOutOfBoundsException if the index is invalid */

Callers 1

insertTestMethod · 0.95

Calls 3

validateIndexMethod · 0.95
resizeMethod · 0.95
maxMethod · 0.45

Tested by 1

insertTestMethod · 0.76