Function parse [src]

Converts s into a type that may be used as a Method field. Asserts that s is 24 or fewer bytes.

Prototype

pub fn parse(s: []const u8) u64

Parameters

s: []const u8

Source

pub fn parse(s: []const u8) u64 { var x: u64 = 0; const len = @min(s.len, @sizeOf(@TypeOf(x))); @memcpy(std.mem.asBytes(&x)[0..len], s[0..len]); return x; }