From 10082360b9124c3eaabfccf4fe10a3640c40a05e Mon Sep 17 00:00:00 2001 From: sonots Date: Wed, 21 Jun 2017 07:43:26 +0000 Subject: 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- NEWS | 2 ++ 1 file changed, 2 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 3f9f620850..d423e8abbd 100644 --- a/NEWS +++ b/NEWS @@ -85,6 +85,8 @@ with all sufficient information, see the ChangeLog file or Redmine (same as "literal".freeze in Ruby 2.1+) [Feature #13295] * String#{casecmp,casecmp?} now return nil for non-string arguments instead of raising a TypeError. [Bug #13312] + * String##delete_prefix is added to remove prefix [Feature #12694] + * String#delete_prefix! is added to remove prefix destructively [Feature #12694] === Stdlib updates (outstanding ones only) -- cgit v1.2.3