[PATCH] D136030: [ADT] Introduce StringRef::{starts,ends}_width{,_insensitive}

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 15 14:24:39 PDT 2022


kazu created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
kazu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch introduces:

  StringRef::starts_with
  StringRef::starts_with_insensitive
  StringRef::ends_with
  StringRef::ends_with_insensitive

to be more compatible with std::string and std::string_view.

I'm planning to deprecate the existing functions in favor of the new
ones.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136030

Files:
  llvm/include/llvm/ADT/StringRef.h
  llvm/lib/Support/StringRef.cpp
  llvm/unittests/ADT/StringRefTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136030.468042.patch
Type: text/x-patch
Size: 5744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221015/f5380d63/attachment.bin>


More information about the llvm-commits mailing list