[PATCH] D47406: [ADT] Add `StringRef::rsplit(StringRef Separator)`.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 08:34:12 PDT 2018


zturner added inline comments.


================
Comment at: include/llvm/ADT/StringRef.h:755
+    /// minimal. If \p Separator is not in the string, then the result is a
+    /// pair (LHS, RHS) where (*this == LHS) and (RHS == "").
+    ///
----------------
I can't decide if it would make more sense to have the "not found" case return a pair `(LHS, RHS)` where `(LHS == "") && (*this == RHS)`?  What do you think?


Repository:
  rL LLVM

https://reviews.llvm.org/D47406





More information about the llvm-commits mailing list