[memfile] Add support for faking files in memory

This commit is contained in:
Will Xyen
2020-10-18 14:46:34 -07:00
parent be5a773cb7
commit 3d4df4cd64
9 changed files with 375 additions and 1 deletions
+9
View File
@@ -250,3 +250,12 @@ bool wstr_eq(const wchar_t *lhs, const wchar_t *rhs)
return wcscmp(lhs, rhs) == 0;
}
}
bool wstr_insensitive_eq(const wchar_t *lhs, const wchar_t *rhs)
{
if (lhs == NULL || rhs == NULL) {
return lhs == rhs;
} else {
return _wcsicmp(lhs, rhs) == 0;
}
}
+1
View File
@@ -21,6 +21,7 @@ void wstr_cpy(wchar_t *dest, size_t dnchars, const wchar_t *src);
wchar_t *wstr_dup(const wchar_t *src);
bool wstr_ends_with(const wchar_t *haystack, const wchar_t *needle);
bool wstr_eq(const wchar_t *lhs, const wchar_t *rhs);
bool wstr_insensitive_eq(const wchar_t *lhs, const wchar_t *rhs);
size_t wstr_format(wchar_t *buf, size_t nchars, const wchar_t *fmt, ...);
bool wstr_narrow(const wchar_t *src, char **dest);
size_t