Skip to contents

Count Characters in a Chars Object

Usage

count(x, value, ignore.case = FALSE)

Arguments

x

A vector of characters.

value

character (length 1) to count

ignore.case

should the letter case be ignored?

Value

integer, count of instances of value in x

Examples

count(chars("strawberry"), 3)
#> [1] 0