MCPcopy Index your code
hub / github.com/benfry/processing4 / index

Method index

core/src/processing/data/StringList.java:438–453  ·  view source on GitHub ↗

Return the first index of a particular value.

(String what)

Source from the content-addressed store, hash-verified

436
437 /** Return the first index of a particular value. */
438 public int index(String what) {
439 if (what == null) {
440 for (int i = 0; i < count; i++) {
441 if (data[i] == null) {
442 return i;
443 }
444 }
445 } else {
446 for (int i = 0; i < count; i++) {
447 if (what.equals(data[i])) {
448 return i;
449 }
450 }
451 }
452 return -1;
453 }
454
455
456 /**

Callers 1

removeValueMethod · 0.95

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected