From 5773ad7ddc7aeae4a467c0d11006d2ceafca4397 Mon Sep 17 00:00:00 2001 From: tschaub Date: Thu, 29 Dec 2011 14:29:03 -0700 Subject: [PATCH] Removing duplicate code. These string prototype methods were unintentionally added twice in 20e19203d54306196c11357283d35ca121c479d8. --- lib/deprecated.js | 69 ----------------------------------------------- 1 file changed, 69 deletions(-) diff --git a/lib/deprecated.js b/lib/deprecated.js index cde92fd6f6..b7f1ef4f33 100644 --- a/lib/deprecated.js +++ b/lib/deprecated.js @@ -939,75 +939,6 @@ if (!String.prototype.camelize) { }; } -if (!String.prototype.startsWith) { - /** - * APIMethod: String.startsWith - * *Deprecated*. Whether or not a string starts with another string. - * - * Parameters: - * sStart - {String} The string we're testing for. - * - * Returns: - * {Boolean} Whether or not this string starts with the string passed in. - */ - String.prototype.startsWith = function(sStart) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.startsWith'})); - return OpenLayers.String.startsWith(this, sStart); - }; -} - -if (!String.prototype.contains) { - /** - * APIMethod: String.contains - * *Deprecated*. Whether or not a string contains another string. - * - * Parameters: - * str - {String} The string that we're testing for. - * - * Returns: - * {Boolean} Whether or not this string contains with the string passed in. - */ - String.prototype.contains = function(str) { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.contains'})); - return OpenLayers.String.contains(this, str); - }; -} - -if (!String.prototype.trim) { - /** - * APIMethod: String.trim - * *Deprecated*. Removes leading and trailing whitespace characters from a string. - * - * Returns: - * {String} A trimmed version of the string - all leading and - * trailing spaces removed - */ - String.prototype.trim = function() { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.trim'})); - return OpenLayers.String.trim(this); - }; -} - -if (!String.prototype.camelize) { - /** - * APIMethod: String.camelize - * *Deprecated*. Camel-case a hyphenated string. - * Ex. "chicken-head" becomes "chickenHead", and - * "-chicken-head" becomes "ChickenHead". - * - * Returns: - * {String} The string, camelized - */ - String.prototype.camelize = function() { - OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", - {'newMethod':'OpenLayers.String.camelize'})); - return OpenLayers.String.camelize(this); - }; -} - if (!Function.prototype.bind) { /** * APIMethod: Function.bind