aboutsummaryrefslogtreecommitdiff
path: root/lib/std/buffer.zig
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2020-02-07 14:17:40 +1100
committerAndrew Kelley <andrew@ziglang.org>2020-03-06 18:49:10 -0500
commit119ac13eda7fe95b6c1139b4bd20e05928abe427 (patch)
tree854e48803baff1397abab4e8b8fba91f374c0cc6 /lib/std/buffer.zig
parentfa46bcb36864e6616ce4449965063f3b8720f8e1 (diff)
downloadzig-119ac13eda7fe95b6c1139b4bd20e05928abe427.tar.gz
zig-119ac13eda7fe95b6c1139b4bd20e05928abe427.zip
std: add .startsWith and .endsWith to std.ArrayList
Diffstat (limited to 'lib/std/buffer.zig')
-rw-r--r--lib/std/buffer.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/buffer.zig b/lib/std/buffer.zig
index f808af1485..bcefe5bdfb 100644
--- a/lib/std/buffer.zig
+++ b/lib/std/buffer.zig
@@ -133,7 +133,7 @@ pub const Buffer = struct {
pub fn startsWith(self: Buffer, m: []const u8) bool {
if (self.len() < m.len) return false;
- return mem.eql(u8, self.list.items[0..m.len], m);
+ return self.list.startsWith(m);
}
pub fn endsWith(self: Buffer, m: []const u8) bool {