/*补全code*/ if(q.getCode()!=null){ String[] codeArr = q.getCode().split(","); StringBuffer sb = new StringBuffer(); for(int i=0;i<codeArr.length;i++){ String cod = String.format("%04d",Integer.parseInt(codeArr[i])); sb.append(cod+","); } q.setCode(sb.deleteCharAt(sb.length()-1).toString()); }
字符串转数组,补全4位,再转成字符串
最新推荐文章于 2023-10-28 15:51:59 发布