summaryrefslogtreecommitdiff
path: root/doc/string/delete_suffix.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/string/delete_suffix.rdoc')
-rw-r--r--doc/string/delete_suffix.rdoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/string/delete_suffix.rdoc b/doc/string/delete_suffix.rdoc
new file mode 100644
index 0000000000..4862b725cf
--- /dev/null
+++ b/doc/string/delete_suffix.rdoc
@@ -0,0 +1,8 @@
+Returns a copy of +self+ with trailing substring <tt>suffix</tt> removed:
+
+ 'hello'.delete_suffix('llo') # => "he"
+ 'hello'.delete_suffix('hel') # => "hello"
+ 'тест'.delete_suffix('ст') # => "те"
+ 'こんにちは'.delete_suffix('ちは') # => "こんに"
+
+Related: String#delete_suffix!, String#delete_prefix.