VuzitCL.ArgvParser.ArgvParser C# (CSharp) 메소드

ArgvParser() 공개 메소드

Base constructor for a single argument.
public ArgvParser ( string args ) : System
args string
리턴 System
        public ArgvParser(string args)
        {
            Regex Extractor = new Regex(@"(['""][^""]+['""])\s*|([^\s]+)\s*",
                                        RegexOptions.Compiled);
            MatchCollection matches;
            string[] parts;
            
            // Get matches (first string ignored because 
            // Environment.CommandLine starts with program filename)
            matches = Extractor.Matches (args);
            parts = new string[matches.Count - 1];

            for (int i = 1; i < matches.Count; i++)
            {
                parts[i-1] = matches[i].Value.Trim ();
            }
        }