summaryrefslogtreecommitdiff
path: root/src/Names.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Names.zig')
-rw-r--r--src/Names.zig6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/Names.zig b/src/Names.zig
index d9597994..af1d5c2d 100644
--- a/src/Names.zig
+++ b/src/Names.zig
@@ -100,12 +100,6 @@ pub fn add(n: *Names, gpa: std.mem.Allocator, row_in: []const u8, key: usize, ke
for (text) |c| n.lower.appendAssumeCapacity(std.ascii.toLower(c));
}
-pub fn relative(path: []const u8, dir: []const u8) []const u8 {
- const d = std.mem.trimEnd(u8, dir, "/");
- if (d.len > 0 and path.len > d.len + 1 and std.mem.startsWith(u8, path, d) and path[d.len] == '/') return path[d.len + 1 ..];
- return path;
-}
-
pub fn baseOf(path: []const u8) u16 {
const slash = std.mem.lastIndexOfScalar(u8, std.mem.trimEnd(u8, path, "/"), '/') orelse return 0;
return @intCast(@min(slash + 1, max_text));