aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/string.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-03-16 10:56:11 +0100
committerGitHub Enterprise <[email protected]>2026-03-16 10:56:11 +0100
commit8c3ba4e8c522d119df3cb48966e36c0eaa80aeb9 (patch)
treecf51b07e097904044b4bf65bc3fe0ad14134074f /src/zencore/string.cpp
parentMerge branch 'sb/no-network' of https://github.ol.epicgames.net/ue-foundation... (diff)
parentEnable cross compilation of Windows targets on Linux (#839) (diff)
downloadzen-sb/no-network.tar.xz
zen-sb/no-network.zip
Merge branch 'main' into sb/no-networksb/no-network
Diffstat (limited to 'src/zencore/string.cpp')
-rw-r--r--src/zencore/string.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/zencore/string.cpp b/src/zencore/string.cpp
index ed0ba6f46..358722b0b 100644
--- a/src/zencore/string.cpp
+++ b/src/zencore/string.cpp
@@ -1181,6 +1181,17 @@ TEST_CASE("string")
CHECK(StrCaseCompare("BBr", "Bar", 2) > 0);
}
+ SUBCASE("StrCaseCompare")
+ {
+ CHECK(StrCaseCompare("foo"sv, "FoO"sv) == 0);
+ CHECK(StrCaseCompare("foo"sv, "FoOz"sv) < 0);
+ CHECK(StrCaseCompare("fooo"sv, "FoO"sv) > 0);
+ CHECK(StrCaseCompare("Bar"sv, "bAs"sv) < 0);
+ CHECK(StrCaseCompare("bAr"sv, "Bas"sv) < 0);
+ CHECK(StrCaseCompare("BBr"sv, "Bar"sv) > 0);
+ CHECK(StrCaseCompare("Bbr"sv, "BAr"sv) > 0);
+ }
+
SUBCASE("ForEachStrTok")
{
const auto Tokens = "here,is,my,different,tokens"sv;