Committed everything

This commit is contained in:
2021-06-30 21:39:19 +10:00
commit fcfa8e7213
525 changed files with 49440 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
using System.Collections.Generic;
namespace Ink
{
public class CharacterSet : HashSet<char>
{
public static CharacterSet FromRange(char start, char end)
{
return new CharacterSet ().AddRange (start, end);
}
public CharacterSet ()
{
}
public CharacterSet(string str)
{
AddCharacters (str);
}
public CharacterSet(CharacterSet charSetToCopy)
{
AddCharacters (charSetToCopy);
}
public CharacterSet AddRange(char start, char end)
{
for(char c=start; c<=end; ++c) {
Add (c);
}
return this;
}
public CharacterSet AddCharacters(IEnumerable<char> chars)
{
foreach (char c in chars) {
Add (c);
}
return this;
}
public CharacterSet AddCharacters (string chars)
{
foreach (char c in chars) {
Add (c);
}
return this;
}
}
}