1 // ==========================================================================
  2 // Project:   SproutCore - JavaScript Application Framework
  3 // Copyright: ©2006-2011 Strobe Inc. and contributors.
  4 //            Portions ©2008-2011 Apple Inc. All rights reserved.
  5 // License:   Licensed under MIT license (see license.js)
  6 // ==========================================================================
  7 
  8 sc_require('system/string');
  9 
 10 SC.supplement(String.prototype,
 11 /** @scope String.prototype */ {
 12 
 13   /**
 14     @see SC.String.capitalize
 15   */
 16   capitalize: function() {
 17     return SC.String.capitalize(this, arguments);
 18   },
 19 
 20   /**
 21     @see SC.String.camelize
 22   */
 23   camelize: function() {
 24     return SC.String.camelize(this, arguments);
 25   },
 26 
 27   /**
 28     @see SC.String.decamelize
 29   */
 30   decamelize: function() {
 31     return SC.String.decamelize(this, arguments);
 32   },
 33 
 34   /**
 35     @see SC.String.dasherize
 36   */
 37   dasherize: function() {
 38     return SC.String.dasherize(this, arguments);
 39   },
 40 
 41   /**
 42     @see SC.String.escapeCssIdForSelector
 43   */
 44   escapeCssIdForSelector: function () {
 45     return SC.String.escapeCssIdForSelector(this);
 46   },
 47 
 48   /**
 49     @see SC.String.loc
 50   */
 51   loc: function() {
 52     var args = SC.$A(arguments);
 53     args.unshift(this);
 54     return SC.String.loc.apply(SC.String, args);
 55   },
 56 
 57   /**
 58     @see SC.String.locWithDefault
 59   */
 60   locWithDefault: function(def) {
 61     var args = SC.$A(arguments);
 62     args.unshift(this);
 63     return SC.String.locWithDefault.apply(SC.String, args);
 64   },
 65   
 66   /**
 67     @see SC.String.mult
 68   */
 69   mult: function(value) {
 70     return SC.String.mult(this, value);
 71   }
 72 
 73 });
 74 
 75