[llvm-commits] [llvm] r156652 - in /llvm/trunk: include/llvm/ADT/StringRef.h lib/Support/StringRef.cpp unittests/ADT/StringRefTest.cpp

Chandler Carruth chandlerc at google.com
Fri May 11 15:17:50 PDT 2012


One more nit I missed in my pass: these need doxygen comments. =]

On Fri, May 11, 2012 at 3:08 PM, Michael J. Spencer
<bigcheesegs at gmail.com>wrote:

> +    StringRef ltrim(StringRef Chars = " \t\n\v\f\r") const {
> +      return drop_front(std::min(Length, find_first_not_of(Chars)));
> +    }
> +
> +    StringRef rtrim(StringRef Chars = " \t\n\v\f\r") const {
> +      return drop_back(Length - std::min(Length, find_last_not_of(Chars)
> + 1));
> +    }
> +
> +    StringRef trim(StringRef Chars = " \t\n\v\f\r") const {
> +      return ltrim(Chars).rtrim(Chars);
> +    }
> +
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120511/3b199951/attachment.html>


More information about the llvm-commits mailing list