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

Method onPattern

output/java_guava/1.4.17/Splitter.java:257–260  ·  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

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

Callers 1

Calls 2

onMethod · 0.95
compileMethod · 0.45

Tested by

no test coverage detected