[ruby-cvs:66310] sonots:r59132 (trunk): string.c: add String#delete_prefix and String#delete_prefix!

sonots at ruby-lang.org sonots at ruby-lang.org
Wed Jun 21 16:43:26 JST 2017


sonots	2017-06-21 16:43:26 +0900 (Wed, 21 Jun 2017)

  New Revision: 59132

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59132

  Log:
    string.c: add String#delete_prefix and String#delete_prefix!
    to remove leading substr [Feature #12694] [fix GH-1632]
    
    * string.c (rb_str_delete_prefix_bang): add a new method
      to remove prefix destuctively.
    
    * string.c (rb_str_delete_prefix): add a new method
      to remove prefix non-destuctively.
    
    * test/ruby/test_string.rb: add tests.

  Modified files:
    trunk/NEWS
    trunk/string.c
    trunk/test/ruby/test_string.rb


More information about the ruby-cvs mailing list