formatEscapeString
Function parameters
Parameters
Useful to make `Path` a key in `std.ArrayHashMap`.
Types
- TableAdapter
- Useful to make `Path` a key in `std.ArrayHashMap`.
Functions in this namespace
Functions
- fmtEscapeChar
- Deprecated, use double quoted escape to print paths.
- formatEscapeChar
- Deprecated, use double quoted escape to print paths.
Source
Implementation
pub fn formatEscapeString(path: Path, writer: *std.io.Writer) std.io.Writer.Error!void {
if (path.root_dir.path) |p| {
try std.zig.stringEscape(p, writer);
if (path.sub_path.len > 0) try std.zig.stringEscape(fs.path.sep_str, writer);
}
if (path.sub_path.len > 0) {
try std.zig.stringEscape(path.sub_path, writer);
}
}