From 00344e1323dc6d9baf09c26f31c409f26a0a1cca Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 18 Mar 2024 16:56:01 +0000 Subject: Add check to people trying to `foreign import` C files. --- src/string.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/string.cpp') diff --git a/src/string.cpp b/src/string.cpp index bd703b2a6..f762dca40 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -104,6 +104,13 @@ gb_internal gb_inline bool str_eq_ignore_case(String const &a, String const &b) return false; } +template +gb_internal gb_inline bool str_eq_ignore_case(String const &a, char const (&b_)[N]) { + String b = {cast(u8 *)b_, N-1}; + return str_eq_ignore_case(a, b); +} + + gb_internal void string_to_lower(String *s) { for (isize i = 0; i < s->len; i++) { s->text[i] = gb_char_to_lower(s->text[i]); -- cgit v1.2.3