summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-11-21 14:23:04 +0000
committerPeter Zhu <peter@peterzhu.ca>2025-12-05 19:05:55 -0800
commitbd64cf00a2e9c295b854c8a4bbb79672bfa1654a (patch)
tree57b9a0cddbe24e867cac4ffb79318be9aee0ff2b /string.c
parent2491a504ffd73e8fabad49fce020fcda484f0be2 (diff)
[DOC] Tweaks for String#capitalize
Diffstat (limited to 'string.c')
-rw-r--r--string.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/string.c b/string.c
index ce90c07d15..9327306384 100644
--- a/string.c
+++ b/string.c
@@ -8118,29 +8118,10 @@ rb_str_capitalize_bang(int argc, VALUE *argv, VALUE str)
/*
* call-seq:
- * capitalize(mapping = :ascii) -> string
+ * capitalize(mapping = :ascii) -> new_string
*
- * Returns a string containing the characters in +self+,
- * each with possibly changed case:
+ * :include: doc/string/capitalize.rdoc
*
- * - The first character is upcased.
- * - All other characters are downcased.
- *
- * Examples:
- *
- * 'hello world'.capitalize # => "Hello world"
- * 'HELLO WORLD'.capitalize # => "Hello world"
- *
- * Some characters do not have upcase and downcase, and so are not changed;
- * see {Case Mapping}[rdoc-ref:case_mapping.rdoc]:
- *
- * '1, 2, 3, ...'.capitalize # => "1, 2, 3, ..."
- *
- * The casing is affected by the given +mapping+,
- * which may be +:ascii+, +:fold+, or +:turkic+;
- * see {Case Mappings}[rdoc-ref:case_mapping.rdoc@Case+Mappings].
- *
- * Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
*/
static VALUE