[llvm-dev] StringRef hasAnyOf/hasAllOf

Davide Italiano via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 23 10:54:56 PST 2018

a downstream consumer of llvm I'm currently working provides the
following two functions:

static bool StringHasAllOf(const llvm::StringRef &s, const char *which);
static bool StringHasAnyOf(const llvm::StringRef &s,
std::initializer_list<const char *> which, size_t &where);


I'm under the impression these could be member functions of StringRef
(maybe with a different signature).

My only concern is that while I think these may be useful for the
general public, I haven't found any immediate use for them in llvm.
So I would like to hear what folks think before proposing the change/patch.



"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare

More information about the llvm-dev mailing list