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.
|
||||
*/
|
||||
String.indexOf = function(object) {
|
||||
for (var i = 0; i < this.length; i++)
|
||||
if (this[i] == object) return i;
|
||||
return -1;
|
||||
var index = -1;
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == object) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user