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

Method removeRange

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

Removes the items between the specified indices, inclusive.

(int start, int end)

Source from the content-addressed store, hash-verified

323
324 /** Removes the items between the specified indices, inclusive. */
325 public void removeRange (int start, int end) {
326 int n = size;
327 validateRange(start, end);
328 int count = end - start + 1, lastIndex = n - count;
329 if (ordered)
330 System.arraycopy(items, start + count, items, start, n - (start + count));
331 else {
332 int i = Math.max(lastIndex, end + 1);
333 System.arraycopy(items, i, items, start, n - i);
334 }
335 size = n - count;
336 }
337
338 /** Removes from this array the first instance of each element contained in the specified array.
339 * @return true if this array was modified. */

Callers 1

removeTestMethod · 0.95

Calls 2

validateRangeMethod · 0.95
maxMethod · 0.45

Tested by 1

removeTestMethod · 0.76