diff options
Diffstat (limited to 'src/textutils.zig')
| -rw-r--r-- | src/textutils.zig | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/textutils.zig b/src/textutils.zig deleted file mode 100644 index 41dd5f5..0000000 --- a/src/textutils.zig +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | const std = @import("std"); | ||
| 2 | |||
| 3 | const Allocator = std.mem.Allocator; | ||
| 4 | const ArrayList = std.ArrayList; | ||
| 5 | |||
| 6 | pub fn escapeXml(writer: anytype, text: []const u8) !void { | ||
| 7 | for (text) |ch| { | ||
| 8 | try switch (ch) { | ||
| 9 | '<' => writer.writeAll("<"), | ||
| 10 | '>' => writer.writeAll(">"), | ||
| 11 | '&' => writer.writeAll("&"), | ||
| 12 | '"' => writer.writeAll("""), | ||
| 13 | else => writer.writeByte(ch), | ||
| 14 | }; | ||
| 15 | } | ||
| 16 | } | ||