| ... | @@ -6,7 +6,7 @@ pub const Jar = std.StringHashMap(string); | ... | @@ -6,7 +6,7 @@ pub const Jar = std.StringHashMap(string); |
| 6 | pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar { | 6 | pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar { |
| 7 | var map = Jar.init(alloc); | 7 | var map = Jar.init(alloc); |
| 8 | const h = cookie_str orelse return map; | 8 | const h = cookie_str orelse return map; |
| 9 | var iter = std.mem.split(u8, h, "; "); | 9 | var iter = std.mem.splitSequence(u8, h, "; "); |
| 10 | while (iter.next()) |item| { | 10 | while (iter.next()) |item| { |
| 11 | const i = std.mem.indexOfScalar(u8, item, '='); | 11 | const i = std.mem.indexOfScalar(u8, item, '='); |
| 12 | if (i == null) continue; | 12 | if (i == null) continue; |
| ... | @@ -21,7 +21,7 @@ pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar { | ... | @@ -21,7 +21,7 @@ pub fn parse(alloc: std.mem.Allocator, cookie_str: ?string) !Jar { |
| 21 | | 21 | |
| 22 | pub fn get(cookie_str: ?string, name: string) ?string { | 22 | pub fn get(cookie_str: ?string, name: string) ?string { |
| 23 | const h = cookie_str orelse return null; | 23 | const h = cookie_str orelse return null; |
| 24 | var iter = std.mem.split(u8, h, "; "); | 24 | var iter = std.mem.splitSequence(u8, h, "; "); |
| 25 | while (iter.next()) |item| { | 25 | while (iter.next()) |item| { |
| 26 | const i = std.mem.indexOfScalar(u8, item, '='); | 26 | const i = std.mem.indexOfScalar(u8, item, '='); |
| 27 | if (i == null) continue; | 27 | if (i == null) continue; |