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)
| 250 | * @throws IllegalArgumentException if {@code separatorPattern} matches the empty string |
| 251 | */ |
| 252 | @GwtIncompatible // java.util.regex |
| 253 | public static Splitter onPattern(String separatorPattern) { |
| 254 | return on(Pattern.compile(separatorPattern)); |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Returns a splitter that divides strings into pieces of the given length. For example, |
no test coverage detected