Finds the index of the specified control or return -1 if it isn't in the collection.

@method indexOf
@param {Control} ctrl Control instance to look for.
@return {Number} Index of the specified control or -1.
331403
function (ctrl) {
        var self = this, i = self.length;

        while (i--) {
          if (self[i] === ctrl) {
            break;
          }
        }

        return i;
      }
481994
function getIndexOfItemWithTextPrefix(element, prefix) {
  const itemTextContents = getItemTextContents(element);
  const prefixLength = prefix.length;
  for (let i = 0; i < itemTextContents.length; i++) {
    const itemTextContent = itemTextContents[i];
    if (itemTextContent.substr(0, prefixLength) === prefix) {
      return i;
    }
  }
  return -1;
}
978948
function getNearestSafeIndex (newIndex) {
    if (newIndex === -1) return -1;
    var maxOffset = Math.max(ctrl.tabs.length - newIndex, newIndex),
        i, tab;
    for (i = 0; i <= maxOffset; i++) {
      tab = ctrl.tabs[ newIndex + i ];
      if (tab && (tab.scope.disabled !== true)) return tab.getIndex();
      tab = ctrl.tabs[ newIndex - i ];
      if (tab && (tab.scope.disabled !== true)) return tab.getIndex();
    }
    return newIndex;
  }
137121
public int indexOf(final OIdentifiable iElement) {
		if (delegate.isEmpty())
			return -1;

		final boolean prevConvert = delegate.isAutoConvertToRecord();
		if (prevConvert)
			delegate.setAutoConvertToRecord(false);

		final int pos = Collections.binarySearch(delegate, iElement);

		if (prevConvert)
			// RESET PREVIOUS SETTINGS
			delegate.setAutoConvertToRecord(true);

		return pos;
	}
435504
public int indexOf(String str) {
        int i;

        for (i = 0; i < size; i++) {
            if (data[i].equals(str)) {
                return i;
            }
        }
        return -1;
    }
1293483
function findIndex (array, predicate) {
  for (let i = 0; i < array.length; i++) {
    if (predicate(array[i])) return i
  }
  return -1
}
1316689
private int indexOf(int key) {
		int startIndex = hashIndex(key);
		int index = startIndex;

		for (;;) {
			if (values[index] == null) {
				// It's available, so no chance that this value exists anywhere in the map.
				return -1;
			}
			if (key == keys[index]) {
				return index;
			}

			// Conflict, keep probing ...
			if ((index = probeNext(index)) == startIndex) {
				return -1;
			}
		}
	}
668399
@Pure
	public int indexOf(P element) {
		int idx;
		int globalIdx = 0;
		for (final GridCell<P> cell : getGridCells()) {
			idx = cell.indexOf(element);
			if (idx != -1) {
				return globalIdx + idx;
			}
			globalIdx += cell.getReferenceElementCount();
		}
		return -1;
	}
951477
function indexOf(values, value){
    if (values.indexOf){
        return values.indexOf(value);
    } else {
        for (var i=0, len=values.length; i < len; i++){
            if (values[i] === value){
                return i;
            }
        }
        return -1;
    }
}
848106
function(item, index) {
                var n = this.length,
                        i = ~~index
                if (i < 0)
                    i += n
                for (; i < n; i++)
                    if (this[i] === item)
                        return i
                return -1
            }
767257
function indexOf(nodeList, el) {
  return Array.prototype.slice.call(nodeList).indexOf(el);
}
21733
function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
    // convert -0 to +0
    if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
    var O = toIObject(this);
    var length = toLength(O.length);
    var index = length - 1;
    if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
    if (index < 0) index = length + index;
    for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
    return -1;
  }
224879
function(c) {

            return !!c &&
                    this.start.x === c.start.x &&
                    this.start.y === c.start.y &&
                    this.controlPoint1.x === c.controlPoint1.x &&
                    this.controlPoint1.y === c.controlPoint1.y &&
                    this.controlPoint2.x === c.controlPoint2.x &&
                    this.controlPoint2.y === c.controlPoint2.y &&
                    this.end.x === c.end.x &&
                    this.end.y === c.end.y;
        }
662528
function(prefix)
{
   var count = -1;
   var ng = {
      next: function()
      {
         ++count;
         return ng.current();
      },
      current: function()
      {
         return '_:' + prefix + count;
      },
      inNamespace: function(iri)
      {
         return iri.indexOf('_:' + prefix) === 0;
      }
   };
   return ng;
}
1157685
function indexOf(list, item) {
  if (NATIVE_ARRAY_INDEXOF) {
    return NATIVE_ARRAY_INDEXOF.call(list, item);
  }

  for (var i = 0; i < list.length; i++) {
    if (list[i] === item) {
      return i;
    }
  }

  return -1;
}
99916
function findFirstListItem(lineNumber, cm) {
  let nextLineNumber = lineNumber;
  let lineText = cm.getLine(lineNumber);

  while (listRE.test(lineText)) {
    nextLineNumber -= 1;
    lineText = cm.getLine(nextLineNumber);
  }

  if (lineNumber === nextLineNumber) {
    nextLineNumber = -1;
  } else {
    nextLineNumber += 1;
  }

  return nextLineNumber;
}
972648
function indexOf(element, fromIndex) {
    /* jshint validthis:true */
    var arr = toArray(this),
        index;

    if (fromIndex) {
        arr = arr.slice(fromIndex);
    }

    index = binarySearch(arr, element, this.comparator);

    if (index < 0) {
        return -1;
    } else {
        return index;
    }
}