| ... | @@ -117,3 +117,9 @@ pub fn getMulti(name: string) ?[]const string { | ... | @@ -117,3 +117,9 @@ pub fn getMulti(name: string) ?[]const string { |
| 117 | const x = multis.get(name).?.items; | 117 | const x = multis.get(name).?.items; |
| 118 | return if (x.len > 0) x else null; | 118 | return if (x.len > 0) x else null; |
| 119 | } | 119 | } |
| | 120 | |
| | 121 | pub fn getBool(name: string, default: bool) !bool { |
| | 122 | const x = getSingle(name) orelse return default; |
| | 123 | const y = try std.fmt.parseUnsigned(u1, x, 2); |
| | 124 | return y > 0; |
| | 125 | } |