Home | History | Annotate | Download | only in base

Lines Matching full:code

31  * An object that divides strings (or other instances of {@code CharSequence})
34 * expression, {@code CharMatcher}, or by using a fixed substring length. This
37 * <p>Here is the most basic example of {@code Splitter} usage: <pre> {@code
41 * This invocation returns an {@code Iterable<String>} containing {@code "foo"}
42 * and {@code "bar"}, in that order.
44 * <p>By default {@code Splitter}'s behavior is very simplistic: <pre> {@code
48 * This returns an iterable containing {@code ["foo", "", "bar", " quux"]}.
51 * ask for them: <pre> {@code
57 * Now {@code MY_SPLITTER.split("foo, ,bar, quux,")} returns an iterable
58 * containing just {@code ["foo", "bar", "quux"]}. Note that the order in which
65 * method such as {@code omitEmptyStrings} has no effect on the instance it
67 * the method. This makes splitters thread-safe, and safe to store as {@code
68 * static final} constants (as illustrated above). <pre> {@code
109 * example, {@code Splitter.on(',').split("foo,,bar")} returns an iterable
110 * containing {@code ["foo", "", "bar"]}.
121 * given {@code CharMatcher} to be a separator. For example, {@code
123 * iterable containing {@code ["foo", "", "bar", "quux"]}.
150 * example, {@code Splitter.on(", ").split("foo, bar, baz,qux")} returns an
151 * iterable containing {@code ["foo", "bar", "baz,qux"]}.
189 * Returns a splitter that considers any subsequence matching {@code
190 * pattern} to be a separator. For example, {@code
197 * @throws IllegalArgumentException if {@code separatorPattern} matches the
224 * pattern (regular expression) to be a separator. For example, {@code
227 * equivalent to {@code Splitter.on(Pattern.compile(pattern))}.
232 * @throws PatternSyntaxException if {@code separatorPattern} is a malformed
234 * @throws IllegalArgumentException if {@code separatorPattern} matches the
243 * For example, {@code Splitter.atEach(2).split("abcde")} returns an
244 * iterable containing {@code ["ab", "cd", "e"]}. The last piece can be
245 * smaller than {@code length} but will never be empty.
272 * Returns a splitter that behaves equivalently to {@code this} splitter, but
273 * automatically omits empty strings from the results. For example, {@code
275 * iterable containing only {@code ["a", "b", "c"]}.
277 * <p>If either {@code trimResults} option is also specified when creating a
279 * emptiness. So, for example, {@code
294 * Returns a splitter that behaves equivalently to {@code this} splitter, but
297 * to {@code trimResults(CharMatcher.WHITESPACE)}. For example, {@code
299 * containing {@code ["a", "b", "c"]}.
308 * Returns a splitter that behaves equivalently to {@code this} splitter, but
309 * removes all leading or trailing characters matching the given {@code
310 * CharMatcher} from each returned substring. For example, {@code
312 * returns an iterable containing {@code ["a ", "b_ ", "c"]}.
350 * Returns the first index in {@code toSplit} at or after {@code start}
356 * Returns the first index in {@code toSplit} after {@code
358 * invoked after a call to {@code separatorStart}.