摘要: replace方法(str 为字符串) str.replace(" ",""); //去除所有空格,包括首尾、中间 str.replaceAll(" ", ""); //去掉所有空格,包括首尾、中间 str.replaceAll(" +",""); //去掉所有空格,包括首尾、中间 str.trim 阅读全文
posted @ 2023-09-12 15:10 颂先生 阅读(116) 评论(0) 推荐(0) 编辑