Lines Matching defs:Prefix
264 /// Check if this string starts with the given \p Prefix.
265 [[nodiscard]] bool starts_with(StringRef Prefix) const {
266 return size() >= Prefix.size() &&
267 compareMemory(data(), Prefix.data(), Prefix.size()) == 0;
269 [[nodiscard]] bool starts_with(char Prefix) const {
270 return !empty() && front() == Prefix;
273 /// Check if this string starts with the given \p Prefix, ignoring case.
274 [[nodiscard]] bool starts_with_insensitive(StringRef Prefix) const;
635 bool consume_front(StringRef Prefix) {
636 if (!starts_with(Prefix))
639 *this = substr(Prefix.size());
645 bool consume_front_insensitive(StringRef Prefix) {
646 if (!starts_with_insensitive(Prefix))
649 *this = substr(Prefix.size());