| author | |
| committer | |
| log | d0799b0e4b5cf986473d0041fd5a16cd98ad3852 |
| tree | 011bc8d14754a852513ec807467824edbe0519fe |
| parent | 54487dbd6b08763c681e6494b96279d2d86b86ca |
1 files changed, 9 insertions(+), 0 deletions(-)
src/lib.zig+9| ... | ... | @@ -21,6 +21,15 @@ pub const Provider = struct { |
| 21 | 21 | id_prop: string = "id", |
| 22 | 22 | logo: string, |
| 23 | 23 | color: string, |
| 24 | ||
| 25 | pub fn domain(self: Provider) string { | |
| 26 | if (std.mem.indexOfScalar(u8, self.id, ',')) |_| { | |
| 27 | var iter = std.mem.split(u8, self.id, ","); | |
| 28 | _ = iter.next(); | |
| 29 | return iter.next().?; | |
| 30 | } | |
| 31 | return self.id; | |
| 32 | } | |
| 24 | 33 | }; |
| 25 | 34 | |
| 26 | 35 | pub const Client = struct { |