case insenstive

Jan 21, 2009 at 1:57 PM
Edited Jan 21, 2009 at 2:01 PM
could it ignore the case of shortName/longName?
Apr 6, 2009 at 7:55 AM
Hi UnRuledBoy,
as you can see in Core/ArgumentParser.cs source file, the code use String.CompareOrdinal(String, String) for compare short and long command line options (and this method is case sensitive). If you can't wait, you can modify this file and use a different String.Compare*() overload.

Anyway, thanks to your post, I will put in a future version a way to control this behavior by code.

Aug 1, 2009 at 5:53 PM

Hi to everyone,

latest release ( beta) could perform case sensitive or non sensitive comparisons.

Just use the new overload of ICommandLineParser::bool ParseArguments(string[] args, object options, ParserSettings settings), using a ParserSettings object with CaseSensitive property set to false.


P.S.: I'll work to fullfill other users requests...

Aug 22, 2009 at 10:22 PM

New release is better thnx

Aug 23, 2009 at 5:50 AM

Thank you fusiondesignerz, and thanks for everyone will try Beta 2 of 1.5 (the latest release at moment of writing this post).

Like said in Beta of 1.5 (and also in Beta 2), releases with this status may change (breaking API compatibility): from Beta to Beta 2, what I said about case sensitive feature is changed; check out Beta 2 release page:

For brevity:

  • ParserSettings -> renamed to a more consistent CommandLineParserSettings.
  • CommandLineParserSettings decoupled form ICommandLineParser and coupled with CommandLineParser constructor.
  • ICommandLineParser::bool ParseArguments(..., ParserSettings settings) removed (and instance implementation too).
  • bool CommandLineParserSettings::CaseSensitive is still available; you can use also use a specific constructor: public CommandLineParserSettings(bool caseSensitive).

Check out Beta 2 and report bugs and design issues using Discussions, Issue Tracker or email directly at me:

Good coding!