| ... | ... | @@ -96,16 +96,6 @@ pub fn trim_suffix(in: string, suffix: string) string { |
| 96 | 96 | return in; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | | pub fn repeat(s: string, times: i32) !string { |
| 100 | | var list = std.ArrayList(u8).init(gpa); |
| 101 | | defer list.deinit(); |
| 102 | | var i: i32 = 0; |
| 103 | | while (i < times) : (i += 1) { |
| 104 | | try list.appendSlice(s); |
| 105 | | } |
| 106 | | return list.toOwnedSlice(); |
| 107 | | } |
| 108 | | |
| 109 | 99 | pub fn list_contains(haystack: []const string, needle: string) bool { |
| 110 | 100 | for (haystack) |item| { |
| 111 | 101 | if (std.mem.eql(u8, item, needle)) { |