Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

parseCpuModel

Public Function
std.Target.Cpu.Arch.parseCpuModel
pub fn parseCpuModel(arch: Arch, cpu_name: []const u8) ?*const Cpu.Model

Params

  • arch: Arch
  • cpu_name: []const u8

File

Target.zig:1696
1696
1697
1698
1699
1700
1701
1702
1703
        pub fn parseCpuModel(arch: Arch, cpu_name: []const u8) ?*const Cpu.Model {
            for (arch.allCpuModels()) |cpu| {
                if (std.mem.eql(u8, cpu_name, cpu.name)) {
                    return cpu;
                }
            }
            return null;
        }