]> Dogcows Code - chaz/carfire/blobdiff - CarFire/CarFire/CarFire/Parse.cs
Map drawing implemented.
[chaz/carfire] / CarFire / CarFire / CarFire / Parse.cs
index 169cf30a7b8340b59af9aa61aae521c9e7c04ad8..b9320778babcbcdfb62d685aec9306ce2639d6c7 100644 (file)
@@ -25,6 +25,18 @@ namespace CarFire
             return null;\r
         }\r
 \r
+        /// <summary>\r
+        /// Parses a comment of an INI file.\r
+        /// </summary>\r
+        /// <param name="line">Text.</param>\r
+        /// <returns>The comment.</returns>\r
+        public static string IniComment(string line)\r
+        {\r
+            Match match = Regex.Match(line, @"^;\s*(.*)\s*$");\r
+            if (match.Success) return match.Groups[1].Value;\r
+            return null;\r
+        }\r
+\r
         /// <summary>\r
         /// Parses a key-value pair.\r
         /// </summary>\r
@@ -182,7 +194,6 @@ namespace CarFire
             // FIXME: This may barf all over itself if there are nested parentheses, doublequotes, brackets, etc.\r
             foreach (Match match in matches)\r
             {\r
-                Console.WriteLine("matched: " + match.Value);\r
                 list.Add(match.Value);\r
             }\r
 \r
This page took 0.01759 seconds and 4 git commands to generate.