coding standards

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3803 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-07-24 21:30:45 +00:00
parent 1d17ebba37
commit c274d8e4c9

View File

@@ -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;
};
/**