strp

strp is useful String object extensions

strp

strp is String Object Extensions for node.js

$ npm install strp
$ npm update strp
var strp = require('strp');
strp.rtrim('hello world   ');
 
// hello world
strp.rtrim('    hello world');
 
// helloworld
strp.rtrim('    hello world    ');
 
// helloworld
strp.join('hello', 'world');
 
// helloworld
strp.joins('hello', 'world');
 
// hello world
strp.joinln('hello', 'world');
 
// hello
// world
strp.lpad('100',10,'0');
 
// 0000000100
strp.rpad('100',10,'0');
 
// 1000000000
strp.ucfirst('hello world');
 
// Hello world
strp.ucfirst('HELLO WORLD');
 
// hELLO WORLD
strp.shuffle('hello world');
 
// ol wohldrewl
strp.reverse('hello world');
 
// dlrow wolleh

LISECE

The MIT License

Copyright (c) 2013 The strp Authors

See the LICENSE file for details.