1% Generated by roxygen2 (4.1.1): do not edit by hand 2% Please edit documentation in R/pystr_find.R 3\name{pystr_find} 4\alias{pystr_find} 5\title{Find the lowest index of a substring.} 6\usage{ 7pystr_find(str, sub, start = 1, end = nchar(str)) 8} 9\arguments{ 10\item{str}{A character vector.} 11 12\item{sub}{A character vector.} 13 14\item{start}{A numeric vector.} 15 16\item{end}{A numeric vector.} 17} 18\value{ 19A numeric vector. \code{-1} indicates \code{sub} was not found. 20} 21\description{ 22Return the lowest index in the string where substring \code{sub} is found, 23such that \code{sub} is contained in the slice \code{substr(str, start, end)}. 24} 25\examples{ 26pystr_find("abcdxyzabc", "abc") 27pystr_find("abc", "xy") 28pystr_find("abcxyzabc", "abc", 4) 29} 30\references{ 31\url{https://docs.python.org/3/library/stdtypes.html#str.find} 32} 33\seealso{ 34\code{\link{pystr_rfind}} 35} 36 37