Skip to content

Commit

Permalink
Add Remove All Whitespace in Beef (#3711)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzuckerm authored Jan 18, 2024
1 parent b19896f commit 93fbae5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions archive/b/beef/RemoveAllWhitespace.bf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;

namespace RemoveAllWhitespace;

class Program
{
public static void Usage()
{
Console.WriteLine("Usage: please provide a string");
Environment.Exit(0);
}

public static void RemoveAllWhitespace(StringView str, ref String result)
{
result.Clear();
result.Join("", str.Split(' ', '\t', '\r', '\n'));
}

public static int Main(String[] args)
{
if (args.Count < 1 || args[0].Length < 1)
{
Usage();
}

String result = scope .();
RemoveAllWhitespace(args[0], ref result);
Console.WriteLine(result);
return 0;
}
}
2 changes: 1 addition & 1 deletion archive/b/beef/testinfo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ folder:

container:
image: "rzuckerm/beef"
tag: "0.43.5a1-3"
tag: "0.43.5a2-4"
build: |
sh -c "BeefBuild -new -workspace={{ source.name }} && \
cp {{ source.name }}{{ source.extension }} {{ source.name }}/src/Program.bf && \
Expand Down

0 comments on commit 93fbae5

Please sign in to comment.