aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/lib/string.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/lib/string.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/lib/string.zig')
-rw-r--r--vendor/libghostty-vt/src/lib/string.zig15
1 files changed, 0 insertions, 15 deletions
diff --git a/vendor/libghostty-vt/src/lib/string.zig b/vendor/libghostty-vt/src/lib/string.zig
deleted file mode 100644
index 795823c2..00000000
--- a/vendor/libghostty-vt/src/lib/string.zig
+++ /dev/null
@@ -1,15 +0,0 @@
-const std = @import("std");
-
-// This is a copy of std.mem.cutPrefix from 0.16. Once Ghostty has been ported
-// to 0.16 this can be removed.
-
-/// If slice starts with prefix, returns the rest of slice starting at
-/// prefix.len.
-pub fn cutPrefix(comptime T: type, slice: []const T, prefix: []const T) ?[]const T {
- return if (std.mem.startsWith(T, slice, prefix)) slice[prefix.len..] else null;
-}
-
-test cutPrefix {
- try std.testing.expectEqualStrings("foo", cutPrefix(u8, "--example=foo", "--example=").?);
- try std.testing.expectEqual(null, cutPrefix(u8, "--example=foo", "-example="));
-}