diff --git a/lib/std/ascii.zig b/lib/std/ascii.zig index 5a9248f2f57d4f60c86184558b8084b50c1e0b5d..e346e87eb6805c0328d909a1709223c628db5858 100644 --- a/lib/std/ascii.zig +++ b/lib/std/ascii.zig @@ -378,17 +378,11 @@ test endsWithIgnoreCase { try std.testing.expect(!endsWithIgnoreCase("BoB", "Bo")); } -/// Deprecated in favor of `findIgnoreCase`. -pub const indexOfIgnoreCase = findIgnoreCase; - /// Finds `needle` in `haystack`, ignoring case, starting at index 0. pub fn findIgnoreCase(haystack: []const u8, needle: []const u8) ?usize { return findIgnoreCasePos(haystack, 0, needle); } -/// Deprecated in favor of `findIgnoreCasePos`. -pub const indexOfIgnoreCasePos = findIgnoreCasePos; - /// Finds `needle` in `haystack`, ignoring case, starting at `start_index`. /// Uses Boyer-Moore-Horspool algorithm on large inputs; `findIgnoreCasePosLinear` on small inputs. pub fn findIgnoreCasePos(haystack: []const u8, start_index: usize, needle: []const u8) ?usize { @@ -410,9 +404,6 @@ pub fn findIgnoreCasePos(haystack: []const u8, start_index: usize, needle: []con return null; } -/// Deprecated in favor of `findIgnoreCaseLinear`. -pub const indexOfIgnoreCasePosLinear = findIgnoreCasePosLinear; - /// Consider using `findIgnoreCasePos` instead of this, which will automatically use a /// more sophisticated algorithm on larger inputs. pub fn findIgnoreCasePosLinear(haystack: []const u8, start_index: usize, needle: []const u8) ?usize { diff --git a/src/Package/Fetch.zig b/src/Package/Fetch.zig index d657a133ac167b997b8dd1efdb6c1474a9520271..ee4670070cd9989401703fe82083f2866ef23a71 100644 --- a/src/Package/Fetch.zig +++ b/src/Package/Fetch.zig @@ -1151,10 +1151,10 @@ const FileType = enum { /// Parameter is a content-disposition header value. fn fromContentDisposition(cd_header: []const u8) ?FileType { - const attach_end = ascii.indexOfIgnoreCase(cd_header, "attachment;") orelse + const attach_end = ascii.findIgnoreCase(cd_header, "attachment;") orelse return null; - var value_start = ascii.indexOfIgnoreCasePos(cd_header, attach_end + 1, "filename") orelse + var value_start = ascii.findIgnoreCasePos(cd_header, attach_end + 1, "filename") orelse return null; value_start += "filename".len; if (cd_header[value_start] == '*') {