Functions
fn hasUniqueRepresentation(comptime T: type) bool
True if every value of the type
T
has a unique bit pattern representing it. I…True if every value of the type
T
has a unique bit pattern representing it. In other words,T
has no unused bits and no padding.fn isZigString(comptime T: type) bool
Returns true if the passed type will coerce to []const u8. Any of the following…
Returns true if the passed type will coerce to []const u8. Any of the following are considered strings:
[]const u8, [:S]const u8, *const [N]u8, *const [N:S]u8, []u8, [:S]u8, *[:S]u8, *[N:S]u8.
These types are not considered strings:
u8, [N]u8, [*]const u8, [*:0]const u8, [*]const [N]u8, []const u16, []const i8, *const u8, ?[]const u8, ?*const [N]u8.