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:
parent
fef8339f58
commit
87ccf7e50a
1 changed files with 2 additions and 0 deletions
2
string.c
2
string.c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue