diff options
Diffstat (limited to 'doc/string/delete_suffix.rdoc')
| -rw-r--r-- | doc/string/delete_suffix.rdoc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/string/delete_suffix.rdoc b/doc/string/delete_suffix.rdoc new file mode 100644 index 0000000000..a4d9a80f85 --- /dev/null +++ b/doc/string/delete_suffix.rdoc @@ -0,0 +1,10 @@ +Returns a copy of +self+ with trailing substring <tt>suffix</tt> removed: + + 'foo'.delete_suffix('o') # => "fo" + 'foo'.delete_suffix('oo') # => "f" + 'foo'.delete_suffix('foo') # => "" + 'foo'.delete_suffix('f') # => "foo" + 'foo'.delete_suffix('x') # => "foo" + 'こんにちは'.delete_suffix('ちは') # => "こんに" + +Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String]. |
