strstr: Substring search

View source: R/string.R

strstrR Documentation

Substring search

Description

find the position of the nth occurrence of needle in haystack, returns 0 if not found

Usage

strstr(haystack, needle, startpos = 1, n = 1)

Arguments

haystack

a string

needle

substring to search for

startpos

start position for search

n

the nth occurrence

Value

an integer


wangtengyao/putils documentation built on Nov. 26, 2024, 2:01 a.m.