Zig 0.17.0-dev (Split by item)
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 library itself.
Zig › compiler/ › Maker/ › Step/ › WriteFile.zig › pathIncluded
pathIncluded
WriteFile.pathIncluded
fn pathIncluded (
conf : *const Configuration ,
exclude_extensions : []const Configuration .String ,
include_extensions : ?[]const Configuration .String ,
path : []const u8 ,
) bool
File
Code
fn pathIncluded (
conf : *const Configuration ,
exclude_extensions : []const Configuration .String ,
include_extensions : ?[]const Configuration .String ,
path : []const u8 ,
) bool {
for (exclude_extensions ) |ext | {
if (std .mem .endsWith (u8 , path , ext .slice (conf )))
return false ;
}
if (include_extensions ) |incs | {
for (incs ) |inc | {
if (std .mem .endsWith (u8 , path , inc .slice (conf )))
return true ;
} else {
return false ;
}
}
return true ;
}