1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

string.c: doc for [Feature #13712]

* string.c (rb_str_start_with): [DOC] start_with? example with
  regexp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-06-01 06:37:14 +00:00
parent fef8339f58
commit 87ccf7e50a

View file

@ -9611,8 +9611,10 @@ rb_str_rpartition(VALUE str, VALUE sep)
* str.start_with?([prefixes]+) -> true or false
*
* Returns true if +str+ starts with one of the +prefixes+ given.
* Each +prefixes+ should be a String or a Regexp.
*
* "hello".start_with?("hell") #=> true
* "hello".start_with?(/H/i) #=> true
*
* # returns true if one of the prefixes matches.
* "hello".start_with?("heaven", "hell") #=> true