function doAssign() {
var str = 'There is not enough room on this planet for you, me and {name}';
var msg = str.assign({name:'Charles Barkley'});
alert(msg)
}
Run Example
function doDasherize() {
var str = "this_is_a_blog_title";
alert(str.dasherize())
}
Run Example
function doSpacify() {
var str = "this-is-a-blog-title";
alert(str.spacify());
}
Run Example
function doWords() {
var str = 'this-is-a-blog-title'.spacify();
var msg = str.words(function(word){
if(word.length>2) {
return word.capitalize()
}
})
alert(msg.join(' '))
}
Run Example