Find/Replace and Preserve Case
I'm struggling to understand what this (subject) feature is for.
What I expected was that when doing a find/replace with "Preserve Case" checked that it would do a "smart case" replacement. For example on replacing String with Integer:
would be changed to:
But instead, it's changed to:
Admittedly, this is a contrived example, but it does illustrate the point.
So, is this supposed to be a "smart case" search and replace? If not what do people use it for, and is it possible to do a "smart case" search by some other means?
请先登录再写评论。
Mark Lee wrote:
I noticed that the replacement text must be all lower-case letters for this
option to work properly. I think it's a bug. Case of the the replacement text
shouldn't matter. Feel free to file an SCR.
Sascha
It is a bug, thank you.
Now if you have String -> Integer the following replacements will be done:
String -> Integer
string ->integer
STRING -> INTEGER
sTRING -> iNTEGER
In other words, case of the first letter is preserved and if the case of the
whole tail is the same, then it is also preserved.
Eugene.
"Mark Lee" <no_mail@jetbrains.com> wrote in message
news:20532781.1069149555146.JavaMail.itn@is.intellij.net...
>
checked that it would do a "smart case" replacement. For example on
replacing String with Integer:
>
do people use it for, and is it possible to do a "smart case" search by some
other means?
>