authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-21 00:15:29 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-02-21 00:15:29 -08:00
loge09157c647f08a087a832cf1da70e0de3f8c0076
tree58fb98a3fb20df9b1e8a0a98b6fff6b977dd59bf
parentb1cc8547ef30e330a9b4a4ed3b65ee961c542043

fix some pubs


1 files changed, 3 insertions(+), 3 deletions(-)

url.zig+3-3
...@@ -1563,7 +1563,7 @@ fn lastcpi(haystack: []const u8) usize {...@@ -1563,7 +1563,7 @@ fn lastcpi(haystack: []const u8) usize {
1563 while (haystack[i] & 0xC0 == 0x80) : (i -= 1) {}1563 while (haystack[i] & 0xC0 == 0x80) : (i -= 1) {}
1564 return i;1564 return i;
1565}1565}
1566fn percentEncodeScalarAL(list: *std.ArrayList(u8), cp: []const u8, comptime set: fn (u8) bool) !void {1566pub fn percentEncodeScalarAL(list: *std.ArrayList(u8), cp: []const u8, comptime set: fn (u8) bool) !void {
1567 if (set(cp[0])) {1567 if (set(cp[0])) {
1568 for (cp) |b| {1568 for (cp) |b| {
1569 try list.append('%');1569 try list.append('%');
...@@ -1573,7 +1573,7 @@ fn percentEncodeScalarAL(list: *std.ArrayList(u8), cp: []const u8, comptime set:...@@ -1573,7 +1573,7 @@ fn percentEncodeScalarAL(list: *std.ArrayList(u8), cp: []const u8, comptime set:
1573 try list.append(cp[0]);1573 try list.append(cp[0]);
1574 }1574 }
1575}1575}
1576fn percentEncodeAL(list: *std.ArrayList(u8), input: []const u8, comptime set: fn (u8) bool) !void {1576pub fn percentEncodeAL(list: *std.ArrayList(u8), input: []const u8, comptime set: fn (u8) bool) !void {
1577 var it = std.unicode.Utf8View.initUnchecked(input).iterator();1577 var it = std.unicode.Utf8View.initUnchecked(input).iterator();
1578 while (it.nextCodepointSlice()) |sl| {1578 while (it.nextCodepointSlice()) |sl| {
1579 if (set(sl[0])) {1579 if (set(sl[0])) {
...@@ -1659,7 +1659,7 @@ fn setHost(href: *ManyArrayList(15, u8), h: URL.Host) !void {...@@ -1659,7 +1659,7 @@ fn setHost(href: *ManyArrayList(15, u8), h: URL.Host) !void {
1659 },1659 },
1660 }1660 }
1661}1661}
1662pub fn replaceInPlace(comptime T: type, input: []T, needle: []const T, replacement: []const T) usize {1662fn replaceInPlace(comptime T: type, input: []T, needle: []const T, replacement: []const T) usize {
1663 // Empty needle will loop until output buffer overflows.1663 // Empty needle will loop until output buffer overflows.
1664 std.debug.assert(needle.len > 0);1664 std.debug.assert(needle.len > 0);
1665 std.debug.assert(needle.len >= replacement.len);1665 std.debug.assert(needle.len >= replacement.len);