有没有人知道如何使用Groovy脚本代码将整数转换为具有指定位数的字符串值?例如,我想将整数值1,2,3,4转换为4位数字符串为"0001","0002","0003"和"0004".
string int groovy
groovy ×1
int ×1
string ×1