From d3cf82e22a69bfde02278be5371d9adc084f8fc7 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 9 May 2009 11:01:47 +0000 Subject: rdoc update. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 1c0b7e4dc8..4d9deb9c69 100644 --- a/string.c +++ b/string.c @@ -6882,7 +6882,16 @@ rb_str_rpartition(VALUE str, VALUE sep) * call-seq: * str.start_with?([prefix]+) => true or false * - * Returns true if str starts with the prefix given. + * Returns true if str starts with a prefix given. + * + * p "hello".start_with?("hell") #=> true + * + * # returns true if one of prefix matches. + * p "hello".start_with?("heaven", "hell") #=> true + * p "hello".start_with?("heaven", "paradice") #=> false + * + * + * */ static VALUE @@ -6905,7 +6914,7 @@ rb_str_start_with(int argc, VALUE *argv, VALUE str) * call-seq: * str.end_with?([suffix]+) => true or false * - * Returns true if str ends with the suffix given. + * Returns true if str ends with a suffix given. */ static VALUE -- cgit v1.2.3