diff options
| author | Stefan Boberg <[email protected]> | 2021-10-19 13:29:46 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-19 13:29:46 +0200 |
| commit | 48970cf67bfd96e07fb036dd5467763c5c2ac20d (patch) | |
| tree | 067481d4ea960d00af9cbd2cd7f2aa8e5efe1d75 /zencore/string.cpp | |
| parent | iobuffer: added templated Data() to make typed data access easier (diff) | |
| download | zen-48970cf67bfd96e07fb036dd5467763c5c2ac20d.tar.xz zen-48970cf67bfd96e07fb036dd5467763c5c2ac20d.zip | |
string: Fixed ToLower logic (needs to use unsigned arithmetic)
Diffstat (limited to 'zencore/string.cpp')
| -rw-r--r-- | zencore/string.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zencore/string.cpp b/zencore/string.cpp index 8e7921bb6..43381aa5d 100644 --- a/zencore/string.cpp +++ b/zencore/string.cpp @@ -936,6 +936,12 @@ TEST_CASE("string") CHECK(HashStringAsLowerDjb2("aBCd"sv) == HashStringDjb2(ToLower("aBCd"sv))); } + SUBCASE("tolower") + { + CHECK_EQ(ToLower("te!st"sv), "te!st"sv); + CHECK_EQ(ToLower("TE%St"sv), "te%st"sv); + } + SUBCASE("ForEachStrTok") { const auto Tokens = "here,is,my,different,tokens"sv; |