[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git] / doc / string / delete_suffix.rdoc
blob4862b725cfc64617a13bcd3c28c2f0a65fad2487
1 Returns a copy of +self+ with trailing substring <tt>suffix</tt> removed:
3   'hello'.delete_suffix('llo')      # => "he"
4   'hello'.delete_suffix('hel')      # => "hello"
5   'тест'.delete_suffix('ст')        # => "те"
6   'こんにちは'.delete_suffix('ちは')  # => "こんに"
8 Related: String#delete_suffix!, String#delete_prefix.