[PATCH] Add {start,end}with_lower methods to StringRef.

Shankar Kalpathi Easwaran shankarke at gmail.com
Tue Oct 29 13:53:36 PDT 2013



================
Comment at: lib/Support/StringRef.cpp:53-55
@@ -49,1 +52,5 @@
+/// compare_lower - Compare strings, ignoring case.
+int StringRef::compare_lower(StringRef RHS) const {
+  if (int Res = ascii_strncasecmp(Data, RHS.Data, min(Length, RHS.Length)))
+    return Res;
   if (Length == RHS.Length)
----------------
return early if Length < RHS.Length.


http://llvm-reviews.chandlerc.com/D2041



More information about the llvm-commits mailing list