coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3803 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -76,9 +76,14 @@ String.prototype.trim = function() {
|
|||||||
* {Integer} The index of the encountered object, or -1 if not found.
|
* {Integer} The index of the encountered object, or -1 if not found.
|
||||||
*/
|
*/
|
||||||
String.indexOf = function(object) {
|
String.indexOf = function(object) {
|
||||||
for (var i = 0; i < this.length; i++)
|
var index = -1;
|
||||||
if (this[i] == object) return i;
|
for (var i = 0; i < this.length; i++) {
|
||||||
return -1;
|
if (this[i] == object) {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return index;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user