[base] Add missing operations and find APIs to StringPiece
This change adds missing APIs from https://wg21.link/string.view.ops and https://wg21.link/string.view.find to base::StringPiece. In particular: * Use traits_type::copy for copy, add CHECK for OOB * Add missing default argument to substr() * Add missing compare() overloads * Add missing find() overloads * Add missing rfind() overloads * Add missing find_first_of() overloads * Add missing find_last_of() overloads * Add missing find_first_not_of() overloads * Add missing find_last_not_of() overloads * Take StringPieces by value instead of const-ref in these APIs Bug: 1049498 Change-Id: I6392dd9e713265fda25721d6f2d1a8f3db133b76 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2632597Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#844495}
Showing
This diff is collapsed.
Please register or sign in to comment