toLowerCase() 使用默认语言环境的规则将此 String 中的所有字符都转换为小写
public String toLowerCase()使用默认语言环境的规则将此 String 中的所有字符都转换为大写
public static void main(String[] args) {
String f= "AAA" ;
String s = f.toLowerCase();
System.out.println(s);
}
输出结果aaa
这个也可以就是麻烦点
import java.util.regex.*;
class Test
{
public static void main(String[] args) throws Exception
{
String str="skdfi
owieij
klsdjf
";
Pattern pattern=Pattern.compile("");
Matcher matcher=pattern.matcher(str);
String temp=matcher.replaceAll("");
System.out.println(temp);
}
}
你可以把代码全部复制到word里然后查找替换啊,很方便的,还省得代码啦
str.replaceAll("IMG", "img")
toLowerCase