Remove skstd::string_view entirely.

We now use std::string_view throughout. SkStringView.h has been moved to
include/private/ and is only used for our C++20/23 compatibility methods
(starts_with/ends_with/contains).

Change-Id: I961842c6778256a03868e7602d48add34f420763
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502306
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/tests/SkStringViewTest.cpp b/tests/SkStringViewTest.cpp
index ddbcc12..6e6b204 100644
--- a/tests/SkStringViewTest.cpp
+++ b/tests/SkStringViewTest.cpp
@@ -5,35 +5,13 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkStringView.h"
+#include <string_view>
 
+#include "include/private/SkStringView.h"
 #include "tests/Test.h"
 
-DEF_TEST(SkStringViewConstructors, r) {
-    skstd::string_view empty;
-    REPORTER_ASSERT(r, empty.data() == nullptr);
-    REPORTER_ASSERT(r, empty.length() == 0);
-
-    const char* str = "Hello, World!";
-    skstd::string_view helloWorld(str);
-    REPORTER_ASSERT(r, helloWorld.data() == str);
-    REPORTER_ASSERT(r, helloWorld.length() == strlen(str));
-
-    skstd::string_view hello(str, 5);
-    REPORTER_ASSERT(r, hello.data() == str);
-    REPORTER_ASSERT(r, hello.length() == 5);
-
-    skstd::string_view copy(hello);
-    REPORTER_ASSERT(r, copy.data() == str);
-    REPORTER_ASSERT(r, copy.length() == 5);
-
-    copy = helloWorld;
-    REPORTER_ASSERT(r, copy.data() == str);
-    REPORTER_ASSERT(r, copy.length() == strlen(str));
-}
-
-DEF_TEST(SkStringViewBasics, r) {
-    skstd::string_view empty("");
+DEF_TEST(SkStringViewStartsAndEnds, r) {
+    std::string_view empty("");
     REPORTER_ASSERT(r, empty.empty());
     REPORTER_ASSERT(r, !skstd::starts_with(empty, 'x'));
     REPORTER_ASSERT(r, !skstd::ends_with(empty, 'x'));
@@ -42,7 +20,7 @@
     REPORTER_ASSERT(r, skstd::starts_with(empty, ""));
     REPORTER_ASSERT(r, skstd::ends_with(empty, ""));
 
-    skstd::string_view xyz("xyz");
+    std::string_view xyz("xyz");
     REPORTER_ASSERT(r, !xyz.empty());
     REPORTER_ASSERT(r, xyz.front() == 'x');
     REPORTER_ASSERT(r, xyz.back() == 'z');
@@ -71,111 +49,6 @@
     REPORTER_ASSERT(r, empty == "xyz");
 }
 
-DEF_TEST(SkStringViewIterator, r) {
-    skstd::string_view str("abc");
-    skstd::string_view::iterator iter = str.begin();
-    REPORTER_ASSERT(r, *(iter++) == 'a');
-    REPORTER_ASSERT(r, *(iter++) == 'b');
-    REPORTER_ASSERT(r, *(iter++) == 'c');
-    REPORTER_ASSERT(r, iter == str.end());
-    REPORTER_ASSERT(r, *(--iter) == 'c');
-    REPORTER_ASSERT(r, *(--iter) == 'b');
-    REPORTER_ASSERT(r, *(--iter) == 'a');
-    REPORTER_ASSERT(r, iter == str.begin());
-
-    skstd::string_view empty;
-    REPORTER_ASSERT(r, empty.begin() == empty.end());
-}
-
-DEF_TEST(SkStringViewOperators, r) {
-    skstd::string_view empty;
-    REPORTER_ASSERT(r, empty == empty);
-    REPORTER_ASSERT(r, empty == "");
-    REPORTER_ASSERT(r, "" == empty);
-    REPORTER_ASSERT(r, !(empty != ""));
-
-    skstd::string_view str("abc");
-    REPORTER_ASSERT(r, str == str);
-    REPORTER_ASSERT(r, str == "abc");
-    REPORTER_ASSERT(r, "abc" == str);
-    REPORTER_ASSERT(r, str != "");
-    REPORTER_ASSERT(r, "" != str);
-    REPORTER_ASSERT(r, str != "abcd");
-    REPORTER_ASSERT(r, "abcd" != str);
-
-    skstd::string_view str2("abcd");
-    REPORTER_ASSERT(r, str < str2);
-    REPORTER_ASSERT(r, str <= str2);
-    REPORTER_ASSERT(r, str <= str);
-    REPORTER_ASSERT(r, str2 > str);
-    REPORTER_ASSERT(r, str2 >= str);
-    REPORTER_ASSERT(r, str >= str);
-    REPORTER_ASSERT(r, !(str2 < str));
-    REPORTER_ASSERT(r, !(str < str));
-    REPORTER_ASSERT(r, !(str2 <= str));
-    REPORTER_ASSERT(r, !(str > str2));
-    REPORTER_ASSERT(r, !(str > str));
-    REPORTER_ASSERT(r, !(str >= str2));
-
-    REPORTER_ASSERT(r, str < "b");
-    REPORTER_ASSERT(r, str <= "b");
-    REPORTER_ASSERT(r, str <= str);
-    REPORTER_ASSERT(r, "b" > str);
-    REPORTER_ASSERT(r, "b" >= str);
-    REPORTER_ASSERT(r, str >= str);
-    REPORTER_ASSERT(r, !("b" < str));
-    REPORTER_ASSERT(r, !(str < str));
-    REPORTER_ASSERT(r, !("b" <= str));
-    REPORTER_ASSERT(r, !(str > "b"));
-    REPORTER_ASSERT(r, !(str > str));
-    REPORTER_ASSERT(r, !(str >= "b"));
-}
-
-DEF_TEST(SkStringViewSubstr, r) {
-    skstd::string_view xyz("xyz");
-    REPORTER_ASSERT(r, xyz.substr() == xyz);
-    REPORTER_ASSERT(r, xyz.substr(0, 1) == "x");
-    REPORTER_ASSERT(r, xyz.substr(0, 2) == "xy");
-    REPORTER_ASSERT(r, xyz.substr(0, 3) == "xyz");
-    REPORTER_ASSERT(r, xyz.substr(0, 4) == "xyz");
-
-    REPORTER_ASSERT(r, xyz.substr(1) == "yz");
-    REPORTER_ASSERT(r, xyz.substr(1, 1) == "y");
-    REPORTER_ASSERT(r, xyz.substr(1, 2) == "yz");
-    REPORTER_ASSERT(r, xyz.substr(1, 3) == "yz");
-
-    REPORTER_ASSERT(r, xyz.substr(2) == "z");
-    REPORTER_ASSERT(r, xyz.substr(2, 1) == "z");
-    REPORTER_ASSERT(r, xyz.substr(2, 2) == "z");
-
-    REPORTER_ASSERT(r, xyz.substr(0, 0).empty());
-    REPORTER_ASSERT(r, xyz.substr(1, 0).empty());
-    REPORTER_ASSERT(r, xyz.substr(2, 0).empty());
-    REPORTER_ASSERT(r, xyz.substr(3, 0).empty());
-
-    REPORTER_ASSERT(r, xyz.substr(3).empty());
-}
-
-DEF_TEST(SkStringViewFind, r) {
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("abcdef") == 0);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("abcdefg") == skstd::string_view::npos);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("") == 0);
-    REPORTER_ASSERT(r, skstd::string_view("").find("") == 0);
-    REPORTER_ASSERT(r, skstd::string_view("").find("a") == skstd::string_view::npos);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("b") == 1);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("f") == 5);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("q") == skstd::string_view::npos);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("bcd") == 1);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("bcd", 2) == skstd::string_view::npos);
-    REPORTER_ASSERT(r, skstd::string_view("abcdef").find("bce") == skstd::string_view::npos);
-    REPORTER_ASSERT(r, skstd::string_view("ttttest1tttest2tttest3").find("test") == 3);
-    REPORTER_ASSERT(r, skstd::string_view("ttttest1tttest2tttest3").find("test", 1) == 3);
-    REPORTER_ASSERT(r, skstd::string_view("ttttest1tttest2tttest3").find("test", 3) == 3);
-    REPORTER_ASSERT(r, skstd::string_view("ttttest1tttest2tttest3").find("test", 4) == 10);
-    REPORTER_ASSERT(r, skstd::string_view("ttttest1tttest2tttest3").find("test2") == 10);
-    REPORTER_ASSERT(r, skstd::string_view("ttttest1tttest2tttest3").find("test3") == 17);
-}
-
 DEF_TEST(SkStringViewContains, r) {
     REPORTER_ASSERT(r, skstd::contains("ttttest1tttest2tttest3", "test"));
     REPORTER_ASSERT(r, skstd::contains("ttttest1tttest2tttest3", "test3"));