diff options
| author | Vexu <15308111+Vexu@users.noreply.github.com> | 2019-07-17 01:20:59 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-17 01:20:59 +0300 |
| commit | f8e753e19c013cc605a951e5038b4a26099aa135 (patch) | |
| tree | 3cbb2ce1b8815bc565344e23a39e3d39505cfd31 /src/buffer.hpp | |
| parent | 0063953d1634ce770ce88519c66e3956832ceb7e (diff) | |
| parent | 158e2312ea5f680b7c8598ef578aefb6cbdd3372 (diff) | |
| download | zig-f8e753e19c013cc605a951e5038b4a26099aa135.tar.gz zig-f8e753e19c013cc605a951e5038b4a26099aa135.zip | |
Merge branch 'master' into comment-in-array
Diffstat (limited to 'src/buffer.hpp')
| -rw-r--r-- | src/buffer.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/buffer.hpp b/src/buffer.hpp index d4a911fc21..d7254c18a7 100644 --- a/src/buffer.hpp +++ b/src/buffer.hpp @@ -136,11 +136,21 @@ static inline bool buf_eql_mem(Buf *buf, const char *mem, size_t mem_len) { return mem_eql_mem(buf_ptr(buf), buf_len(buf), mem, mem_len); } +static inline bool buf_eql_mem_ignore_case(Buf *buf, const char *mem, size_t mem_len) { + assert(buf->list.length); + return mem_eql_mem_ignore_case(buf_ptr(buf), buf_len(buf), mem, mem_len); +} + static inline bool buf_eql_str(Buf *buf, const char *str) { assert(buf->list.length); return buf_eql_mem(buf, str, strlen(str)); } +static inline bool buf_eql_str_ignore_case(Buf *buf, const char *str) { + assert(buf->list.length); + return buf_eql_mem_ignore_case(buf, str, strlen(str)); +} + static inline bool buf_starts_with_mem(Buf *buf, const char *mem, size_t mem_len) { if (buf_len(buf) < mem_len) { return false; |
