Browse files

Added docs for 'remove' method [ci skip]

  • Loading branch information...
raysrashmi committed Aug 14, 2013
1 parent 70d6e16 commit a2aa1d434a5fe9a703eccb99d1a4a994bc4f5df4
Showing with 11 additions and 0 deletions.
  1. +11 −0 guides/source/
@@ -1249,6 +1249,17 @@ Calling `to_s` on a safe string returns a safe string, but coercion with `to_str
Calling `dup` or `clone` on safe strings yields safe strings.
+### `remove`
+The method `remove` will remove all occurrences of the pattern:
+"Hello World".remove(/Hello /) => "World"
+There's also the destructive version `String#remove!`.
+NOTE: Defined in `active_support/core_ext/string/filters.rb`.
### `squish`
The method `squish` strips leading and trailing whitespace, and substitutes runs of whitespace with a single space each:

0 comments on commit a2aa1d4

Please sign in to comment.