Skip to content

Instantly share code, notes, and snippets.

@Renerick
Last active March 27, 2019 18:33
Show Gist options
  • Select an option

  • Save Renerick/5dc3a00b5095f677b41ca6bea9c6d24e to your computer and use it in GitHub Desktop.

Select an option

Save Renerick/5dc3a00b5095f677b41ca6bea9c6d24e to your computer and use it in GitHub Desktop.
private static void Main()
{
var reader =
new StringReader(" Hello world! asd!lfkj ...d ...ю...d .. lasdfj']al skdfj.lask ;! k lkj ");
var writer = new StringWriter();
CharacterInfo c;
State state = State.TrailingSpaces;
c = reader.ReadChar();
while (c.Type != CharacterType.End)
{
var result = Table[state][c.Type];
writer.Write(result.f(c));
state = result.s;
c = reader.ReadChar();
}
Console.WriteLine(writer.ToString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment