From 9f072db19bc4f674b85c936c7983212c4034030d Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Sun, 25 Sep 2016 04:06:39 +0000 Subject: [PATCH] Add a comment on StringRef::contains(char) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282350 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/StringRef.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index f6a348e8ab4..d3683c79e50 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -379,6 +379,8 @@ namespace llvm { LLVM_ATTRIBUTE_ALWAYS_INLINE bool contains(StringRef Other) const { return find(Other) != npos; } + /// Return true if the given character is contained in *this, and false + /// otherwise. LLVM_ATTRIBUTE_ALWAYS_INLINE bool contains(char C) const { return find_first_of(C) != npos; } -- 2.11.0