zoukankan      html  css  js  c++  java
  • java中空格的操作

     1 /**
     2      * 路径去掉空格
     3      */
     4     public static void getPath(){
     5         String path = "C:/Users/v-guoxiao/Desktop/2-Particulars of the cited marks";
     6         path = path.replaceAll("\s*", "");
     7         System.out.println(path);
     8     }
     9     
    10     
    11     /**
    12      * 分割字符串获取空值
    13      */
    14     public static void getEndResult(){
    15         String string = "G1421089&@#16&@#C:/Users/v-guoxiao/Desktop/ReferenceNewFileWordPicture/商标3-16类/image2-4.jpg&@#HALO COFFEE LIMITED&@#2018-09-06&@#&@#";
    16         String[] sss = string.split("&@#",-1);
    17         for(int i = 0; i < sss.length; i++){
    18             System.out.println("=============="+sss[i]);
    19         }
    20     }
  • 相关阅读:
    jmeter 插件
    jmeter beanshell
    Linux awk&sed
    Linux 各文件系统配置
    Linux常用基本命令 1
    testNg自动化,读取excel的数据
    jmeter 控制器
    Web
    SQL语句
    HTML
  • 原文地址:https://www.cnblogs.com/xiaoyue1606bj/p/11577009.html
Copyright © 2011-2022 走看看