MCPcopy Create free account
hub / github.com/antlr/codebuff / onPattern

Method onPattern

output/java_guava/1.4.13/Splitter.java:258–261  ·  view source on GitHub ↗

Returns a splitter that considers any subsequence matching a given pattern (regular expression) to be a separator. For example, Splitter.onPattern("\r?\n").split(entireFile) splits a string into lines whether it uses DOS-style or UNIX-style line terminators. This is equivalent to {@code Spli

(String separatorPattern)

Source from the content-addressed store, hash-verified

256 */
257
258 @GwtIncompatible // java.util.regex
259 public static Splitter onPattern(String separatorPattern) {
260 return on(Pattern.compile(separatorPattern));
261 }
262
263 /**
264 * Returns a splitter that divides strings into pieces of the given length. For example,

Callers

nothing calls this directly

Calls 2

onMethod · 0.95
compileMethod · 0.45

Tested by

no test coverage detected