From 8b6f2c765000198f78776c975f331a18ecc2d7ad Mon Sep 17 00:00:00 2001 From: Chris Boesch <48591413+chrboesch@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:38:02 +0100 Subject: [PATCH] removed trim of trailing spaces --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 3943d01..45268f9 100644 --- a/build.zig +++ b/build.zig @@ -462,7 +462,7 @@ const exercises = [_]Exercise{ // }, .{ .main_file = "999_the_end.zig", - .output = "This is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", + .output = "\nThis is the end for now!\nWe hope you had fun and were able to learn a lot, so visit us again when the next exercises are available.", }, }; @@ -687,9 +687,9 @@ const ZiglingStep = struct { }, } - const trimOutput = std.mem.trim(u8, output, " \r\n"); - const trimExerciseOutput = std.mem.trim(u8, self.exercise.output, " \r\n"); // validate the output + const trimOutput = std.mem.trimRight(u8, output, " \r\n"); + const trimExerciseOutput = std.mem.trimRight(u8, self.exercise.output, " \r\n"); if (std.mem.indexOf(u8, trimOutput, trimExerciseOutput) == null or trimOutput.len != trimExerciseOutput.len) { print( \\