MCPcopy Create free account
hub / github.com/GateNLP/gate-core / cleanString

Method cleanString

src/main/java/gate/Utils.java:266–272  ·  view source on GitHub ↗

Return a cleaned version of the input String. (Delete leading and trailing whitespace; normalize internal whitespace to single spaces; return an empty String if the input contains nothing but whitespace, but null if the input is null.) @return a cleaned version of the input String.

(String input)

Source from the content-addressed store, hash-verified

264 * @return a cleaned version of the input String.
265 */
266 public static String cleanString(String input) {
267 if (input == null) {
268 return null;
269 }
270 // implied else
271 return input.replaceAll("\\s+", " ").trim();
272 }
273
274 /**
275 * Get the start offset of an annotation.

Callers 1

cleanStringForMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected