Compare commits

...

2 Commits

Author SHA1 Message Date
gary 6cc6e9e7ed [studio] Rename caseInsensitiveEquals to caseInsensitiveStrCmp
Build / build (push) Successful in 1m9s
2026-05-17 15:56:14 -05:00
gary de859bef77 [ox/std] Rename caseInsensitiveEquals to caseInsensitiveStrCmp 2026-05-17 15:55:35 -05:00
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ constexpr char toUpper(char const c) noexcept {
}
[[nodiscard]]
constexpr int caseInsensitiveEquals(ox::StringViewCR a, ox::StringViewCR b) noexcept {
constexpr int caseInsensitiveStrCmp(StringViewCR a, StringViewCR b) noexcept {
auto const sz = ox::min(a.size(), b.size());
for (size_t i{}; i < sz; ++i) {
auto const ac = toUpper(a[i]);
@@ -36,9 +36,9 @@ static void printUsage() noexcept {
[[nodiscard]]
static constexpr ox::Result<ox::ClawFormat> getFmt(ox::StringViewCR fmtStr) noexcept {
if (caseInsensitiveEquals(fmtStr, "mc") == 0) {
if (caseInsensitiveStrCmp(fmtStr, "mc") == 0) {
return ox::ClawFormat::Metal;
} else if (caseInsensitiveEquals(fmtStr, "oc") == 0) {
} else if (caseInsensitiveStrCmp(fmtStr, "oc") == 0) {
return ox::ClawFormat::Organic;
}
return ox::Error{1, "invalid format"};