diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-01 06:37:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-01 06:37:14 +0000 |
commit | 87ccf7e50a71a7fbfc2f2c428dde7513793fb740 (patch) | |
tree | 4e2808f674fb33799a9d7bc384b4545941e6ae14 | |
parent | fef8339f582b125e1fec5f3d47adbb48f7cede92 (diff) |
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
-rw-r--r-- | string.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |