MCPcopy
hub / github.com/libgdx/libgdx / deleteFirst

Method deleteFirst

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

Deletes the character wherever it occurs in the CharArray.

(char ch)

Source from the content-addressed store, hash-verified

1357
1358 /** Deletes the character wherever it occurs in the CharArray. */
1359 public CharArray deleteFirst (char ch) {
1360 for (int i = 0; i < size; i++) {
1361 if (items[i] == ch) {
1362 delete(i, i + 1, 1);
1363 break;
1364 }
1365 }
1366 return this;
1367 }
1368
1369 /** Deletes the string wherever it occurs in the CharArray. */
1370 public CharArray deleteFirst (String str) {

Callers 1

deleteTestMethod · 0.95

Calls 3

deleteMethod · 0.95
indexOfMethod · 0.95
lengthMethod · 0.45

Tested by 1

deleteTestMethod · 0.76