coding standards

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3804 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-07-24 21:56:07 +00:00
parent c274d8e4c9
commit b94c492cf6
+4 -2
View File
@@ -97,9 +97,11 @@ String.indexOf = function(object) {
*/ */
String.prototype.camelize = function() { String.prototype.camelize = function() {
var oStringList = this.split('-'); var oStringList = this.split('-');
if (oStringList.length == 1) return oStringList[0]; if (oStringList.length == 1) {
return oStringList[0];
}
var camelizedString = this.indexOf('-') == 0 var camelizedString = (this.indexOf('-') == 0)
? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
: oStringList[0]; : oStringList[0];