Project

General

Profile

Bug #4652 ยป string_start_with_improve.diff

Patch improving the documentation - agrimm (Andrew Grimm), 05/08/2011 09:51 PM

View differences:

string.c
7139 7139
 *  call-seq:
7140 7140
 *     str.start_with?([prefix]+)   -> true or false
7141 7141
 *
7142
 *  Returns true if <i>str</i> starts with a prefix given.
7142
 *  Returns true if <i>str</i> starts with one of the prefixes given.
7143 7143
 *
7144 7144
 *    p "hello".start_with?("hell")               #=> true
7145 7145
 *
7146
 *    # returns true if one of prefix matches.
7146
 *    # returns true if one of the prefixes matches.
7147 7147
 *    p "hello".start_with?("heaven", "hell")     #=> true
7148
 *    p "hello".start_with?("heaven", "paradice") #=> false
7148
 *    p "hello".start_with?("heaven", "paradise") #=> false
7149 7149
 *
7150 7150
 *
7151 7151
 *
......
7171 7171
 *  call-seq:
7172 7172
 *     str.end_with?([suffix]+)   -> true or false
7173 7173
 *
7174
 *  Returns true if <i>str</i> ends with a suffix given.
7174
 *  Returns true if <i>str</i> ends with one of the suffixes given.
7175 7175
 */
7176 7176

  
7177 7177
static VALUE
7178
-