Return for needles whether they occur in the haystack, trimmed if desired

dedup_matches_trimmed(needles, haystack, start = 0, end = 0)

Arguments

needles

The entries to look for

haystack

The set of entries in which to look

start

The number of characters to use from the beginning (truncating after this number of characters, e.g. only looking at the first 20 characters)

end

The number of characters to use from the end (trimming everything before this number of characters, e.g. only looking at the last 10 characters)

Value

A logical vector

Examples

dedup_matches_trimmed(
  c('a', 'b', 'c'),
  c('c', 'd')
);
#> [1] FALSE FALSE  TRUE