Renamed helpers to correspond to renamed Controller classes.
[merb_radiant.git] / public / javascripts / .svn / text-base / string.js.svn-base
blob78b3cbb75933d5558c63e649992bcdbd2ff5c253
1 Object.extend(String.prototype, {
2   upcase: function() {
3     return this.toUpperCase();
4   },
6   downcase: function() {
7     return this.toLowerCase();
8   },
9   
10   toInteger: function() {
11     return parseInt(this);
12   },
13   
14   toSlug: function() {
15     return this.strip().downcase().replace(/[^-a-z0-9~\s\.:;+=_]/g, '').replace(/[\s\.:;=+]+/g, '-');
16   }
17 });