Skip to content

Instantly share code, notes, and snippets.

@ufcpp
Last active December 1, 2022 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ufcpp/3eeebaf3c79c0af2f76336f8e38b3104 to your computer and use it in GitHub Desktop.
Save ufcpp/3eeebaf3c79c0af2f76336f8e38b3104 to your computer and use it in GitHub Desktop.
mixed-space C# source code
var a = new[] {
0,
1,
2,
3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
};
using var f = new StreamWriter("a.cs");
var ws = new[] { 0x0009, 0x000B, 0x000C, 0x20, 0xA0, 0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000 }.Select(i => (char)i).ToArray();
f.WriteLine("""
var a = new[] {
""");
for (int i = 0; i < ws.Length; i++)
{
var w = ws[i];
f.WriteLine($"{w}{w}{w}{w}{i},");
}
f.WriteLine("""
};
""");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment