X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=CarFire%2FCarFire%2FCarFire%2FParse.cs;h=b9320778babcbcdfb62d685aec9306ce2639d6c7;hb=26bf916b7a42c6b33ae720aa9a41e3de752961d1;hp=169cf30a7b8340b59af9aa61aae521c9e7c04ad8;hpb=7fa101e60a4bc35dfd5dabf8f66811e3f8cfa673;p=chaz%2Fcarfire
diff --git a/CarFire/CarFire/CarFire/Parse.cs b/CarFire/CarFire/CarFire/Parse.cs
index 169cf30..b932077 100644
--- a/CarFire/CarFire/CarFire/Parse.cs
+++ b/CarFire/CarFire/CarFire/Parse.cs
@@ -25,6 +25,18 @@ namespace CarFire
return null;
}
+ ///
+ /// Parses a comment of an INI file.
+ ///
+ /// Text.
+ /// The comment.
+ public static string IniComment(string line)
+ {
+ Match match = Regex.Match(line, @"^;\s*(.*)\s*$");
+ if (match.Success) return match.Groups[1].Value;
+ return null;
+ }
+
///
/// Parses a key-value pair.
///
@@ -182,7 +194,6 @@ namespace CarFire
// FIXME: This may barf all over itself if there are nested parentheses, doublequotes, brackets, etc.
foreach (Match match in matches)
{
- Console.WriteLine("matched: " + match.Value);
list.Add(match.Value);
}