llvm.org GIT mirror llvm / 323a3e6
Fix pasto in StringRef::count(char) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79356 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 11 years ago
2 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
176176 size_t Count = 0;
177177 for (size_t i = 0, e = Length; i != e; ++i)
178178 if (Data[i] == C)
179 return i;
179 ++Count;
180180 return Count;
181181 }
182182
9595 EXPECT_TRUE(Str.find("zz") == StringRef::npos);
9696
9797 EXPECT_TRUE(Str.count('l') == 2);
98 EXPECT_TRUE(Str.count('o') == 1);
9899 EXPECT_TRUE(Str.count('z') == 0);
99100 EXPECT_TRUE(Str.count("helloworld") == 0);
100101 EXPECT_TRUE(Str.count("hello") == 1);