diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-10-26 21:59:16 +0100 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-10-27 21:18:53 -0400 |
| commit | e3c4298d404d6a2cdfca006bf71f83360f24a5b0 (patch) | |
| tree | 95d490fa81463b9f71d490f4c17cf3fc80b908d2 /string.c | |
| parent | bf2663ce0645dcf5b375829d31e755e13da9852e (diff) | |
[DOC] Tweaks for String#swapcase!
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -6190,7 +6190,7 @@ rb_pat_search(VALUE pat, VALUE str, long pos, int set_backref_str) * * Like String#sub, except that: * - * - Changed are made to +self+, not to copy of +self+. + * - Changes are made to +self+, not to copy of +self+. * - Returns +self+ if any changes are made, +nil+ otherwise. * * Related: see {Modifying}[rdoc-ref:String@Modifying]. @@ -8203,20 +8203,12 @@ rb_str_capitalize(int argc, VALUE *argv, VALUE str) * call-seq: * swapcase!(mapping) -> self or nil * - * Upcases each lowercase character in +self+; - * downcases uppercase character; - * returns +self+ if any changes were made, +nil+ otherwise: - * - * s = 'Hello World!' # => "Hello World!" - * s.swapcase! # => "hELLO wORLD!" - * s # => "hELLO wORLD!" - * ''.swapcase! # => nil - * - * The casing may be affected by the given +mapping+; - * see {Case Mapping}[rdoc-ref:case_mapping.rdoc]. + * Like String#swapcase, except that: * - * Related: String#swapcase. + * - Changes are made to +self+, not to copy of +self+. + * - Returns +self+ if any changes are made, +nil+ otherwise. * + * Related: see {Modifying}[rdoc-ref:String@Modifying]. */ static VALUE |
