Project

General

Profile

« Previous | Next » 

Revision 510957df

Added by sonots (Naotoshi Seo) almost 7 years ago

string.c: add String#delete_suffix and String#delete_suffix!
to remove trailing suffix [Feature #13665] [Fix GH-1661]

  • string.c (rb_str_delete_suffix_bang): add a new method
    to remove suffix destuctively.

  • string.c (rb_str_delete_suffix): add a new method
    to remove suffix non-destuctively.

  • test/ruby/test_string.rb: add tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e