下面是我的代码:
def readln = javax.swing.JOptionsPane.&showInputDialog
def env = readln 'Which environment you want to test'
我输入输入为syst
当我比较这就是我正在做的
if("$env".equalsIgnoreCase("syst")){
some code
}
还尝试了许多其他方法来比较喜欢
if($env.equalsIgnoreCase("syst"))
if(env.equalsUIgnoreCase("syst"))
if("${'env'}".equalsIgnoreCase("syst"))
但以上都不起作用,条件不满足。如何将声明的字符串与从对话框输入的字符串进行比较?