Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 9f072db

Browse files
author
Zachary Turner
committed
Add a comment on StringRef::contains(char)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282350 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 3ae26e9 commit 9f072db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/llvm/ADT/StringRef.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ namespace llvm {
379379
LLVM_ATTRIBUTE_ALWAYS_INLINE
380380
bool contains(StringRef Other) const { return find(Other) != npos; }
381381

382+
/// Return true if the given character is contained in *this, and false
383+
/// otherwise.
382384
LLVM_ATTRIBUTE_ALWAYS_INLINE
383385
bool contains(char C) const { return find_first_of(C) != npos; }
384386

0 commit comments

Comments
 (0)