首页 > 编程知识 正文

vue换行字符串,java字符串去除回车

时间:2023-05-03 12:47:05 阅读:32305 作者:4915

应用于xml、json和条带化字符串

//*

*字符串格式处理(实现换行和空格处的字符串换行功能) ) ) ) ) ) ) ) ) ) )。

* @param xml

*/

隐私保护转换器(stringxmlorjson )。

if(xmlorjson==null||''.equals )|'null'.equals({

返回' ';

}

//处理字符串

String[] beforechar={ '、'、'、'、'、'、')、' %、%%、%、%、%、%、%%、%、% };

String[] afterchar={ ',',',',',',',',',',

()、)、)、)、)、)、)、)、)、)、)、)、)、)、)。

for(intI=0; i beforechar.length; I ) {

xmlorjson=xmlorjson.replace all (before char [ I ],afterchar[i] );

}

xmlorjson=xmlorjson.replace all ('n ','');

xmlorjson=xmlorjson.replaceAll (','');

xmlorjson=xmlorjson.replace all ((t ),) );

返回xmlorjson;

}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。