Prerequisites
Version
5.1, 7.0, 7.1
Link to affected document
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-7.2#common-features
Description of the documentation error
Common features section starts with the following sentence:
By default, string comparisons are case-insensitive.
This seem to imply that there is a way to change the case-sensitivity behavior for, say, -eq operator.
Moreover, Powershell language specification 3.0 section 7.8.1 states:
For two strings to compare equal, they must have the same length and contents, and letter case, if appropriate.
Which, if I read that correctly, requires case sensitive comparisons.
Suggested fix
Either provide details regarding how to make string comparisons case-sensitive or rephrase to remove the ambiguity.
Not sure what to do about spec, but it seems it is pretty old and maybe irrelevant at this point.
Prerequisites
Version
5.1, 7.0, 7.1
Link to affected document
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comparison_operators?view=powershell-7.2#common-features
Description of the documentation error
Common features section starts with the following sentence:
This seem to imply that there is a way to change the case-sensitivity behavior for, say,
-eqoperator.Moreover, Powershell language specification 3.0 section 7.8.1 states:
Which, if I read that correctly, requires case sensitive comparisons.
Suggested fix
Either provide details regarding how to make string comparisons case-sensitive or rephrase to remove the ambiguity.
Not sure what to do about spec, but it seems it is pretty old and maybe irrelevant at this point.