Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Adding CaseSensitive parameter to StrReplace. #103
This seems like it could be useful, but I wonder: how often would it be used, and how often are the OutputVarCount and Limit parameters used?
It is already possible to control the case-sensitivity of StrReplace (though perhaps not in the most convenient way), whereas OutputVarCount and Limit provide functionality that would otherwise require either a custom replacement function or RegExReplace. The current parameter order is identical to RegExReplace, which aides memorization.
I couldn't find any instance of StrReplace with more than three parameters in any of my scripts, but I know I have used OutputVarCount (or at least ErrorLevel with StringReplace). I do not recall having ever used StringCaseSense with StrReplace/StringReplace, although that might be because I am comfortable with regex. (I'm not sure that I've used StringCaseSense at all.)
In one sense it will always be used, that is, since not specifying the parameter is equivalent to passing
Regarding the parameter order, I'm quite neutral to it. I made a guess that the new parameter would be specified more often than the others. Whenever I use the