Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 341 Bytes

delete_suffix.rdoc

File metadata and controls

8 lines (6 loc) · 341 Bytes

Returns a copy of self with trailing substring suffix removed:

'hello'.delete_suffix('llo')      # => "he"
'hello'.delete_suffix('hel')      # => "hello"
'тест'.delete_suffix('ст')        # => "те"
'こんにちは'.delete_suffix('ちは')  # => "こんに"

Related: String#delete_suffix!, String#delete_prefix.