pystr_count: Count the occurrences of a substring.

Description Usage Arguments Value References Examples

Description

Return the number of non-overlapping occurrences of substring sub in the range start, end.

Usage

1

Arguments

str

A character vector.

sub

A character string.

start

An integer.

end

An integer.

Value

A numeric vector.

References

https://docs.python.org/3/library/stdtypes.html#str.count

Examples

1
2
3
4
pystr_count("ababab", "aba")
pystr_count("abcxyzabc123", "abc")
pystr_count("a--b--c", "--", 4)
pystr_count(c("one", "two", "three"), "e")


Search within the pystr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.