aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorgingerBill <ginger.bill.22@gmail.com>2016-07-25 11:14:25 +0100
committergingerBill <ginger.bill.22@gmail.com>2016-07-25 11:14:25 +0100
commit32ab8fcf99df786c264ca566799b022c66cca34b (patch)
tree79b3f9642c1e49c3995b417fd8b599a20974f564 /src/common.cpp
parent9d8355d3612e65a5764640fb972bc4ef9f013088 (diff)
`alias` and unified parameters lists for procedures and structures.
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common.cpp b/src/common.cpp
index 24d9e1008..5b87639cf 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -31,6 +31,19 @@ gb_inline b32 are_strings_equal(String a, String b) {
return false;
}
+gb_inline b32 are_strings_equal_ignore_case(String a, String b) {
+ if (a.len == b.len) {
+ for (isize i = 0; i < a.len; i++) {
+ char x = cast(char)a.text[i];
+ char y = cast(char)b.text[i];
+ if (gb_char_to_lower(x) != gb_char_to_lower(y))
+ return false;
+ }
+ return true;
+ }
+ return false;
+}
+
gb_inline isize string_extension_position(String str) {
isize dot_pos = -1;