Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
v0.0.3
Browse files Browse the repository at this point in the history
Cleanup readme
  • Loading branch information
Sergej Müller committed Jun 17, 2016
1 parent bce1e9f commit 4c494bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
34 changes: 9 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rtrim ( str [, chars ] )
`str` → The input string<br>
`chars` → Characters that you want to be stripped

Without the second parameter, `ltrim` will strip whitespaces (spaces, tabs and new lines).
Without the second parameter, `rtrim` will strip whitespaces (spaces, tabs and new lines).


Examples
Expand All @@ -37,31 +37,15 @@ Examples
var rtrim = require('rtrim');


/**
* Strip whitespace from the end of a string
*/
/* Strip whitespace from the end of a string */
rtrim( ' Hello ' ) + ' World' // → Hello World

rtrim( ' Hello ' ) + ' World' // Hello World
/* Strip multiple special chars from the end of a string */
rtrim( '... Hello World ...', ' .' ); // →... Hello World

/* Strip multiple chars from the end of a string */
rtrim( 'Hello World', 'Hdle' ); // →Hello Wor

/**
* Strip multiple special chars from the end of a string
* e.g. space & dot
*/

rtrim( '... Hello World ...', ' .' ); // ... Hello World


/**
* Strip multiple chars from the end of a string
*/

rtrim( 'Hello World', 'Hdle' ); // Hello Wor


/**
* Strip trailing slash from the end of a string
*/

rtrim( 'https://goo.gl/', '/' ); // https://goo.gl
/* Strip trailing slash from the end of a string */
rtrim( 'https://goo.gl/', '/' ); // →https://goo.gl
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rtrim",
"version": "0.0.2",
"version": "0.0.3",
"description": "Strip whitespace - or other characters - from the end of a string",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 4c494bb

Please sign in to comment.