powered by

strfind(s1, s2, overlap = TRUE) strfindi(s1, s2, overlap = TRUE) findstr(s1, s2, overlap = TRUE)

s2

strfind

s1

strfindi does not distinguish between lower and upper case.

strfindi

findstr should only be used as internal function, in Matlab it is deprecated. It searches for the shorter string within the longer one.

findstr

strcmp

S <- c("", "ab", "aba", "aba aba", "abababa") s <- "aba" strfind(S, s) strfindi(toupper(S), s) strfind(S, s, overlap = FALSE)

Run the code above in your browser using DataLab