Remove the ill-considered StringRef::numberOfCharacters

It never counted characters, only codepoints. If you think these
are interchangeable, you should not touch non-ascii text.
This commit is contained in:
Martin Hořeňovský committed 2019-09-07 20:13:22 +02:00
1 parent f2c2711bdc
commit fe967b1f41
9 files changed
+6 -95

No files matched your search

@@ -159,18 +159,6 @@ TEST_CASE( "StringRef", "[Strings][StringRef]" ) {
REQUIRE( stdStr.size() == sr.size() );
}
}
SECTION( "Counting utf-8 codepoints" ) {
StringRef ascii = "just a plain old boring ascii string...";
REQUIRE(ascii.numberOfCharacters() == ascii.size());
StringRef simpleu8 = u8"Trocha češtiny nikoho nezabila";
REQUIRE(simpleu8.numberOfCharacters() == 30);
StringRef emojis = u8"Here be 👾";
REQUIRE(emojis.numberOfCharacters() == 9);
}
}
TEST_CASE( "replaceInPlace", "[Strings][StringManip]" ) {