MCPcopy Create free account
hub / github.com/diyhi/bbs / replaceBlank

Method replaceBlank

src/main/java/cms/utils/FileUtil.java:219–227  ·  view source on GitHub ↗

去除字符串中的空格、回车、换行符、制表符 @param content 内容 @return

(String content)

Source from the content-addressed store, hash-verified

217 * @return
218 */
219 public static String replaceBlank(String content) {
220 String dest = "";
221 if (content != null) {
222 Pattern p = Pattern.compile("\\s*|\t|\r|\n");
223 Matcher m = p.matcher(content);
224 dest = m.replaceAll("");
225 }
226 return dest;
227 }
228
229 /**
230 * 移除UTF-8BOM 标志

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected