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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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).