We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55dd202 commit 07a3ab5Copy full SHA for 07a3ab5
doc/string/delete_suffix.rdoc
@@ -1,8 +1,11 @@
1
Returns a copy of +self+ with trailing substring <tt>suffix</tt> removed:
2
3
- 'hello'.delete_suffix('llo') # => "he"
4
- 'hello'.delete_suffix('hel') # => "hello"
5
- 'тест'.delete_suffix('ст') # => "те"
+ 'foo'.delete_suffix('o') # => "fo"
+ 'foo'.delete_suffix('oo') # => "f"
+ 'foo'.delete_suffix('foo') # => ""
6
+ 'foo'.delete_suffix('f') # => "foo"
7
+ 'foo'.delete_suffix('x') # => "foo"
8
+ 'тест'.delete_suffix('ст') # => "те"
9
'こんにちは'.delete_suffix('ちは') # => "こんに"
10
-Related: String#delete_suffix!, String#delete_prefix.
11
+Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
0 commit comments