Skip to content

Commit

Permalink
docs: add reset method to README (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX authored Feb 6, 2024
1 parent 44b0407 commit ebca2ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ If `substitution` is a regex, then it must have the global (`g`) flag set, or a

Removes the characters from `start` to `end` (of the original string, **not** the generated string). Removing the same content twice, or making removals that partially overlap, will cause an error. Returns `this`.

### s.reset( start, end )

Resets the characters from `start` to `end` (of the original string, **not** the generated string).
It can be used to restore previously removed characters and discard unwanted changes.

### s.slice( start, end )

Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. Throws error if the indices are for characters that were already removed.
Expand Down

0 comments on commit ebca2ec

Please sign in to comment.