比如一个字符串," 安 卓开 发第 一 章 hellow world";
String str =" 安 卓开 发第 一 章 hellow world";Log.d("替换前:", str);str= str.replaceAll("([A-Za-z-]) +([A-Za-z-])","$1@$2");str= str.replaceAll("\\s+","").replaceAll("@"," ");Log.d("替换后:" , str);
时间:2021-08-31 21:26:48
比如一个字符串," 安 卓开 发第 一 章 hellow world";
String str =" 安 卓开 发第 一 章 hellow world";Log.d("替换前:", str);str= str.replaceAll("([A-Za-z-]) +([A-Za-z-])","$1@$2");str= str.replaceAll("\\s+","").replaceAll("@"," ");Log.d("替换后:" , str);
java字符串统计英文字符用什么不同_Java-统计字符串中英文单词总数
2021-08-26
python中文字符串多余空格_[785]python去掉字符串中多余的空格
2019-08-19
java去掉字符串中前后空格函数_JAVA中去掉字符串空格各种方法详解
2022-07-21
一石二鸟-Kill Two Birds with One Stone1500字英语作文
2024-07-28