mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 09:24:33 +00:00
Update microsoft_craziness.h to work correctly with the rest of the codebase (and not use WIN32_LEAN_AND_MEAN)
This commit is contained in:
@@ -207,6 +207,23 @@ gb_inline bool string_ends_with(String const &s, String const &suffix) {
|
||||
return substring(s, s.len-suffix.len, s.len) == suffix;
|
||||
}
|
||||
|
||||
gb_inline bool string_starts_with(String const &s, u8 prefix) {
|
||||
if (1 > s.len) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return s[0] == prefix;
|
||||
}
|
||||
|
||||
|
||||
gb_inline bool string_ends_with(String const &s, u8 suffix) {
|
||||
if (1 > s.len) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return s[s.len-1] == suffix;
|
||||
}
|
||||
|
||||
gb_inline isize string_extension_position(String const &str) {
|
||||
isize dot_pos = -1;
|
||||
isize i = str.len;
|
||||
|
||||
Reference in New Issue
Block a user