Last active
February 21, 2016 00:33
-
-
Save DaemonOverlord/a605b1ddf3185b0406fb to your computer and use it in GitHub Desktop.
Wolf.cs is an extremely simple parse I wrote. It's currently a work in progress because I plan on redoing it with the workload put onto the code and not the programmer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Wolf | |
{ | |
public class Pack { | |
internal static string input { get; set; } | |
public static string[] parsed { get; internal set; } | |
public static int count { get; internal set; } | |
public static int entries { get; internal set; } | |
} | |
public class Parser { | |
public static void Parse(string input) { | |
Pack.input = input; | |
Pack.parsed = Pack.input.Split (' '); | |
Pack.count = Pack.parsed.Length; | |
Pack.entries = Pack.parsed.Length - 1; | |
} | |
public class Parsed { | |
public string Entry (int number) { | |
return Pack.parsed [0 + number]; | |
} | |
public string Initial() { | |
return Pack.parsed [0]; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment