For a project I was working on today it seemed it would be useful to
have a couple of operators defined for strings arrays, so I went
ahead and implemented them.
First, for an array of strings S and a single string s:
S .= s
returns a vector of the length of S, with 1s in positions where s is
matched, 0s otherwise. This is similar to the instrings() function
but gives the information in a different form that may be more
convenient in some cases. Plus,
S .!= s
gives the complementary vector.
Second,
S2 = S - s
returns an array of strings obtained by removing all elements of S
that match s. If you want to modify S rather than construct a new
array, then
S -= s
does the job -- with greater efficiency, since the removal is done
in-place, requiring no extra memory allocation.
These will be documented in due course.
Allin