parse
Function parameters
Parameters
- str:[]const u8
Type definitions in this namespace
Types
Functions in this namespace
Functions
- requiresLibC
- Does this target require linking libc? This may be the case if the target has an unstable
- cCharSignedness
- Default signedness of `char` for the native C compiler for this target
Source
Implementation
pub fn parse(str: []const u8) !WindowsVersion {
return std.meta.stringToEnum(WindowsVersion, str) orelse
@enumFromInt(std.fmt.parseInt(u32, str, 0) catch
return error.InvalidOperatingSystemVersion);
}