summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorBurdette Lamar <BurdetteLamar@Yahoo.com>2025-07-12 09:55:33 -0500
committerGitHub <noreply@github.com>2025-07-12 10:55:33 -0400
commitb0db93c002d07a60105d32299530e2a0ee88ee5f (patch)
tree3ad6db0387422cd14e0d2bee816e9a17427defc5 /string.c
parent9e7a985c6dd72955616cbbfffc595b5721f4f385 (diff)
[DOC] Tweaks for String#count
Diffstat (limited to 'string.c')
-rw-r--r--string.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/string.c b/string.c
index abab46c07f..b1dccce4ef 100644
--- a/string.c
+++ b/string.c
@@ -9111,23 +9111,7 @@ rb_str_tr_s(VALUE str, VALUE src, VALUE repl)
* call-seq:
* count(*selectors) -> integer
*
- * Returns the total number of characters in +self+
- * that are specified by the given +selectors+
- * (see {Multiple Character Selectors}[rdoc-ref:character_selectors.rdoc@Multiple+Character+Selectors]):
- *
- * a = "hello world"
- * a.count "lo" #=> 5
- * a.count "lo", "o" #=> 2
- * a.count "hello", "^l" #=> 4
- * a.count "ej-m" #=> 4
- *
- * "hello^world".count "\\^aeiou" #=> 4
- * "hello-world".count "a\\-eo" #=> 4
- *
- * c = "hello world\\r\\n"
- * c.count "\\" #=> 2
- * c.count "\\A" #=> 0
- * c.count "X-\\w" #=> 3
+ * :include: doc/string/count.rdoc
*/
static VALUE