[llvm-dev] StringRef hasAnyOf/hasAllOf
Davide Italiano via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 23 11:16:35 PST 2018
On Fri, Feb 23, 2018 at 10:54 AM, Davide Italiano <davide at freebsd.org> wrote:
> 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.
Joerg correctly pointed out on IRC we already have them in LLVM (thanks Joerg).
I'll just convert the uses. Sorry for the noise!
More information about the llvm-dev