From ec8a6b05b3787e1701f4d16fbbed1c81d12f9615 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Tue, 11 Sep 2007 14:23:37 +0000 Subject: [PATCH] FredJ points out that this was never used or needed. I dug back and found out that it was added in the Original Prototype -> No Prototype conversion -- but looking at the code, adding it was clearly a mistake. Removing String.indexOf. (Note that this has no affect on the code: this function would never be called, because it wasn't defined on the prototoype.) (Closes #963) git-svn-id: http://svn.openlayers.org/trunk/openlayers@4216 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/BaseTypes.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index 4537e6a99c..bc9f648c83 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -54,27 +54,6 @@ String.prototype.trim = function() { return this.replace(/^\s+/, '').replace(/\s+$/, ''); }; -/** - * APIMethod: String.indexOf - * Index of a character in a string. - * - * Parameters: - * object - {Object} Can be a string or a number - * - * Returns: - * {Integer} The index of the encountered object, or -1 if not found. - */ -String.indexOf = function(object) { - var index = -1; - for (var i = 0; i < this.length; i++) { - if (this[i] == object) { - index = i; - break; - } - } - return index; -}; - /** * APIMethod: camelize * Camel-case a hyphenated string.