startsWith {strings} | R Documentation |
Determines if entries of x start or end with string (entries of)
prefix or suffix respectively, where strings are recycled to
common lengths.
startsWith(x, prefix,
fixed = TRUE);
A logical vector, of “common length” of x and prefix (or suffix), i.e., of the longer of the two lengths unless one of them is zero when the result is also of zero length. A shorter input is recycled to the output length.