关于String分割

来源:互联网 发布:ubuntu安装firefox命令 编辑:程序博客网 时间:2024/06/04 08:58

如下:

String text="123.45";String [] temp = null;   temp = text.split("\\.");    

如果使用"."、"|"、"^"等字符做分隔符时,要写成s3.split("\\^")的格式,

否则不能拆分。


0 0
原创粉丝点击