Menu

#57 ParseBool does not support exact match

Outstanding
closed
nobody
None
1
2015-01-04
2014-11-12
Yaniv Adler
No

ParseBool always uses lowerCase values so exact match is not supported.
Extending it is useless since there is not access to the 'trueValues' and 'falseValue' collections.

Discussion

  • Kasper B. Graversen

    Maybe a flag could be introduced which tells the class whether to be lenient or not. An extra constructor could be introduced and the default is lenient since that is the existing functionality. Feel free to send a patch and we'll look at it.

     
  • James Bassett

    James Bassett - 2014-11-12

    Don't forget to check for existing issues similar to yours....there's already an open bug report and a feature request regarding this :)

    Yeah I think an 'ignoreCase' flag in the constructor would fine (it would change the underlying implementation but that's cool). I agree the default should be true (which would make it backwards compatible for anyone upgrading).

     
  • James Bassett

    James Bassett - 2015-01-04
    • Status: open --> closed
     

Log in to post a comment.