Initial commit
This commit is contained in:
10
Utils/Extensions.cs
Normal file
10
Utils/Extensions.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace MoniteurBaie.Utils;
|
||||
|
||||
public static class Extensions
|
||||
{
|
||||
public static char ToChar(this bool b) => b ? 'O' : 'N';
|
||||
|
||||
public static string ToEmoji(this bool b) => b ? "✔️" : "❌";
|
||||
|
||||
public static string ToAnsi(this bool b) => $"{(b ? "\u001b[32m" : "\u001b[31m")}{ToChar(b)}\u001b[0m";
|
||||
}
|
||||
Reference in New Issue
Block a user