Project

General

Profile

Bug #10476 ยป bug-10476.patch

Anonymous, 11/15/2014 06:51 PM

View differences:

string.c
7208 7208
 *  change was made. See also <code>String#rstrip!</code> and
7209 7209
 *  <code>String#strip!</code>.
7210 7210
 *
7211
 *  Refer to <code>strip</code> for the definition of whitespace. 
7212
 * 
7211 7213
 *     "  hello  ".lstrip   #=> "hello  "
7212 7214
 *     "hello".lstrip!      #=> nil
7213 7215
 */
......
7244 7246
 *  Returns a copy of <i>str</i> with leading whitespace removed. See also
7245 7247
 *  <code>String#rstrip</code> and <code>String#strip</code>.
7246 7248
 *
7249
 *  Refer to <code>strip</code> for the definition of whitespace. 
7250
 * 
7247 7251
 *     "  hello  ".lstrip   #=> "hello  "
7248 7252
 *     "hello".lstrip       #=> "hello"
7249 7253
 */
......
7328 7332
 *  Returns a copy of <i>str</i> with trailing whitespace removed. See also
7329 7333
 *  <code>String#lstrip</code> and <code>String#strip</code>.
7330 7334
 *
7335
 *  Refer to <code>strip</code> for the definition of whitespace. 
7336
 * 
7331 7337
 *     "  hello  ".rstrip   #=> "  hello"
7332 7338
 *     "hello".rstrip       #=> "hello"
7333 7339
 */
......
7354 7360
 *
7355 7361
 *  Removes leading and trailing whitespace from <i>str</i>. Returns
7356 7362
 *  <code>nil</code> if <i>str</i> was not altered.
7363
 *
7364
 *  Refer to <code>strip</code> for the definition of whitespace.
7357 7365
 */
7358 7366

  
7359 7367
static VALUE
......
7390 7398
 *     str.strip   -> new_str
7391 7399
 *
7392 7400
 *  Returns a copy of <i>str</i> with leading and trailing whitespace removed.
7401
 * 
7402
 *  Whitespace is defined as any of the following characters:
7403
 *  null, horizontal tab, line feed, vertical tab, form feed, carriage return, space.
7393 7404
 *
7394 7405
 *     "    hello    ".strip   #=> "hello"
7395 7406
 *     "\tgoodbye\r\n".strip   #=> "goodbye"
7407
 *     "\x00\t\n\v\f\r ".strip #=> ""
7396 7408
 */
7397 7409

  
7398 7410
static VALUE
7399
-