Lines Matching refs:trim
224 TEST(StringRefTest, Trim) {
235 EXPECT_EQ(StringRef("hello"), Str0.trim());
236 EXPECT_EQ(StringRef("hello"), Str1.trim());
237 EXPECT_EQ(StringRef("hello"), Str2.trim());
239 EXPECT_EQ(StringRef("ello"), Str0.trim("hhhhhhhhhhh"));
241 EXPECT_EQ(StringRef(""), StringRef("").trim());
242 EXPECT_EQ(StringRef(""), StringRef(" ").trim());
243 EXPECT_EQ(StringRef("\0", 1), StringRef(" \0 ", 3).trim());
244 EXPECT_EQ(StringRef("\0\0", 2), StringRef("\0\0", 2).trim());
245 EXPECT_EQ(StringRef("x"), StringRef("\0\0x\0\0", 5).trim(StringRef("\0", 1)));