Home
last modified time | relevance | path

Searched refs:split (Results 1 – 25 of 77) sorted by relevance

1234

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/
DSplitTest.java36 String[] results = p.split("have/you/done/it/right"); in testSimple()
44 assertArraysEqual(new String[0], "hello".split(".")); in testEmptySplits()
45 assertArraysEqual(new String[] { "1", "2" }, "1:2:".split(":")); in testEmptySplits()
47 assertArraysEqual(new String[0], ":".split(":")); in testEmptySplits()
49 assertArraysEqual(new String[] { "1", "2", "" }, "1:2:".split(":", -1)); in testEmptySplits()
52 assertArraysEqual(new String[] { "", "", "o" }, "hello".split("..")); in testEmptySplits()
55 assertArraysEqual(new String[] { "hello" }, "hello".split("not-present-in-test")); in testEmptySplits()
58 assertArraysEqual(new String[] { "" }, "".split("not-present-in-test")); in testEmptySplits()
59 assertArraysEqual(new String[] { "" }, "".split("A?")); in testEmptySplits()
66 assertArraysEqual(new String[] { "a", "b", "c" }, "a,b,c".split(",", 0)); in testEmptySplits()
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DStringSplitBenchmark.java24 "this,is,a,simple,example".split(","); in timeStringSplitComma()
30 "this.is.a.simple.example".split("\\."); in timeStringSplitLiteralDot()
36 "this\nis\na\nsimple\nexample\n".split("\n"); in timeStringSplitNewline()
43 p.split("this,is,a,simple,example"); in timePatternSplitComma()
50 p.split("this.is.a.simple.example"); in timePatternSplitLiteralDot()
56 "this,is,a,harder,example".split("[,]"); in timeStringSplitHard()
/libcore/luni/src/test/java/libcore/java/util/regex/
DOldAndroidRegexTest.java162 strings = p.split("boo:and:foo"); in testSplit()
168 strings = p.split("boo:and:foo", 2); in testSplit()
173 strings = p.split("boo:and:foo", 5); in testSplit()
179 strings = p.split("boo:and:foo", -2); in testSplit()
187 strings = p.split("boo:and:foo"); in testSplit()
193 strings = p.split("boo:and:foo", 5); in testSplit()
201 strings = p.split("boo:and:foo", -2); in testSplit()
209 strings = p.split("boo:and:foo", 0); in testSplit()
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/
DPatternTest.java90 assertEquals(",,".split(",", 3).length, 3); in testSplitCharSequenceBug6193()
91 assertEquals(",,".split(",", 4).length, 3); in testSplitCharSequenceBug6193()
95 assertEquals(Pattern.compile("o").split("boo:and:foo", 5).length, 5); in testSplitCharSequenceBug5391()
96 assertEquals(Pattern.compile("b").split("ab", -1).length, 2); in testSplitCharSequenceBug5391()
103 s = pat.split("zxx:zzz:zxx", 10); in testSplitCharSequence()
105 s = pat.split("zxx:zzz:zxx", 3); in testSplitCharSequence()
107 s = pat.split("zxx:zzz:zxx", -1); in testSplitCharSequence()
109 s = pat.split("zxx:zzz:zxx", 0); in testSplitCharSequence()
113 s = pat.split("abccbadfebb"); in testSplitCharSequence()
115 s = pat.split(""); in testSplitCharSequence()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DAbstractFileSystemProvider.java45 private static String[] split(String attribute) { in split() method in AbstractFileSystemProvider
73 String[] s = split(attribute); in setAttribute()
86 String[] s = split(attributes); in readAttributes()
92 return view.readAttributes(s[1].split(",")); in readAttributes()
DUnixMountEntry.java69 for (String opt: Util.split(optionsAsString, ',')) { in hasOption()
/libcore/luni/src/test/java/libcore/java/lang/
DOldStringTest.java225 patterns[i], Arrays.equals(results[i], str.split(patterns[i]))); in test_splitLString()
229 str.split("[a}"); in test_splitLString()
245 Arrays.equals(results[0], str.split(pattern, 4))); in test_splitLStringLint()
247 Arrays.equals(results[1], str.split(pattern, 9))); in test_splitLStringLint()
249 Arrays.equals(results[1], str.split(pattern, 0))); in test_splitLStringLint()
251 Arrays.equals(results[1], str.split(pattern, -1))); in test_splitLStringLint()
253 Arrays.equals(results[1], str.split(pattern, 10))); in test_splitLStringLint()
255 Arrays.equals(results[1], str.split(pattern, Integer.MAX_VALUE))); in test_splitLStringLint()
258 str.split("[a}", 0); in test_splitLStringLint()
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DSpinedBufferTest.java98 Spliterator<Integer> split = spliterator.trySplit(); in testLastSplit() local
99 long splitSizes = (split == null) ? 0 : split.getExactSizeIfKnown(); in testLastSplit()
173 Spliterator.OfInt split = spliterator.trySplit(); in testIntLastSplit() local
174 long splitSizes = (split == null) ? 0 : split.getExactSizeIfKnown(); in testIntLastSplit()
248 Spliterator.OfLong split = spliterator.trySplit(); in testLongLastSplit() local
249 long splitSizes = (split == null) ? 0 : split.getExactSizeIfKnown(); in testLongLastSplit()
324 Spliterator.OfDouble split = spliterator.trySplit(); in testLongLastSplit() local
325 long splitSizes = (split == null) ? 0 : split.getExactSizeIfKnown(); in testLongLastSplit()
/libcore/ojluni/src/main/java/java/util/
DArraysParallelSortHelpers.java180 T split = a[(lh = ln >>> 1) + lb]; in compute() local
183 if (c.compare(split, a[rm + rb]) <= 0) in compute()
193 T split = a[(rh = rn >>> 1) + rb]; in compute() local
196 if (c.compare(split, a[lm + lb]) <= 0) in compute()
293 byte split = a[(lh = ln >>> 1) + lb]; in compute()
296 if (split <= a[rm + rb]) in compute()
306 byte split = a[(rh = rn >>> 1) + rb]; in compute()
309 if (split <= a[lm + lb]) in compute()
404 char split = a[(lh = ln >>> 1) + lb]; in compute() local
407 if (split <= a[rm + rb]) in compute()
[all …]
DSplittableRandom.java397 public SplittableRandom split() { in split() method in SplittableRandom
846 new RandomIntsSpliterator(rng.split(), i, index = m, origin, bound); in trySplit()
902 new RandomLongsSpliterator(rng.split(), i, index = m, origin, bound); in trySplit()
959 new RandomDoublesSpliterator(rng.split(), i, index = m, origin, bound); in trySplit()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DSpliteratorTestHelper.java338 Spliterator<T> split = spliterator.trySplit(); in testSplitAfterFullTraversal() local
339 assertNull(split); in testSplitAfterFullTraversal()
344 split = spliterator.trySplit(); in testSplitAfterFullTraversal()
345 assertNull(split); in testSplitAfterFullTraversal()
351 split = spliterator.trySplit(); in testSplitAfterFullTraversal()
352 assertNull(split); in testSplitAfterFullTraversal()
425 Spliterator<T> split = spliterator.trySplit(); in splitSixDeepVisitor() local
426 if (split != null) { in splitSixDeepVisitor()
427 assertSpliterator(split, rootCharacteristics); in splitSixDeepVisitor()
432 assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize()); in splitSixDeepVisitor()
[all …]
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DSpliteratorTestHelper.java338 Spliterator<T> split = spliterator.trySplit(); in testSplitAfterFullTraversal() local
339 assertNull(split); in testSplitAfterFullTraversal()
344 split = spliterator.trySplit(); in testSplitAfterFullTraversal()
345 assertNull(split); in testSplitAfterFullTraversal()
351 split = spliterator.trySplit(); in testSplitAfterFullTraversal()
352 assertNull(split); in testSplitAfterFullTraversal()
425 Spliterator<T> split = spliterator.trySplit(); in splitSixDeepVisitor() local
426 if (split != null) { in splitSixDeepVisitor()
427 assertSpliterator(split, rootCharacteristics); in splitSixDeepVisitor()
432 assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize()); in splitSixDeepVisitor()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DCDATASectionImpl.java52 public void split() { in split() method in CDATASectionImpl
58 String[] parts = getData().split("\\]\\]>"); in split()
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentLinkedDequeTest.java760 int split = rng.nextInt(max - 1) + 1; in testIteratorRemove() local
764 for (int j = 1; j <= split; ++j) in testIteratorRemove()
767 assertEquals(it.next(), new Integer(split + 1)); in testIteratorRemove()
768 for (int j = 1; j <= split; ++j) in testIteratorRemove()
771 for (int j = split + 1; j <= max; ++j) { in testIteratorRemove()
828 int split = rng.nextInt(max - 1) + 1; in testDescendingIteratorRemove() local
832 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
835 assertEquals(it.next(), new Integer(split + 1)); in testDescendingIteratorRemove()
836 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
839 for (int j = split + 1; j <= max; ++j) { in testDescendingIteratorRemove()
DArrayDequeTest.java788 int split = rng.nextInt(max - 1) + 1; in testIteratorRemove() local
792 for (int j = 1; j <= split; ++j) in testIteratorRemove()
795 assertEquals(it.next(), new Integer(split + 1)); in testIteratorRemove()
796 for (int j = 1; j <= split; ++j) in testIteratorRemove()
799 for (int j = split + 1; j <= max; ++j) { in testIteratorRemove()
856 int split = rng.nextInt(max - 1) + 1; in testDescendingIteratorRemove() local
860 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
863 assertEquals(it.next(), new Integer(split + 1)); in testDescendingIteratorRemove()
864 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
867 for (int j = split + 1; j <= max; ++j) { in testDescendingIteratorRemove()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DConcurrentLinkedDequeTest.java794 int split = rng.nextInt(max - 1) + 1; in testIteratorRemove() local
798 for (int j = 1; j <= split; ++j) in testIteratorRemove()
801 assertEquals(it.next(), new Integer(split + 1)); in testIteratorRemove()
802 for (int j = 1; j <= split; ++j) in testIteratorRemove()
805 for (int j = split + 1; j <= max; ++j) { in testIteratorRemove()
862 int split = rng.nextInt(max - 1) + 1; in testDescendingIteratorRemove() local
866 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
869 assertEquals(it.next(), new Integer(split + 1)); in testDescendingIteratorRemove()
870 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
873 for (int j = split + 1; j <= max; ++j) { in testDescendingIteratorRemove()
DArrayDequeTest.java845 int split = rng.nextInt(max - 1) + 1; in testIteratorRemove() local
849 for (int j = 1; j <= split; ++j) in testIteratorRemove()
852 assertEquals(it.next(), new Integer(split + 1)); in testIteratorRemove()
853 for (int j = 1; j <= split; ++j) in testIteratorRemove()
856 for (int j = split + 1; j <= max; ++j) { in testIteratorRemove()
913 int split = rng.nextInt(max - 1) + 1; in testDescendingIteratorRemove() local
917 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
920 assertEquals(it.next(), new Integer(split + 1)); in testDescendingIteratorRemove()
921 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
924 for (int j = split + 1; j <= max; ++j) { in testDescendingIteratorRemove()
/libcore/ojluni/src/main/java/sun/security/util/
DAlgorithmDecomposer.java44 String[] transTockens = transPattern.split(algorithm); in decomposeImpl()
57 String[] tokens = pattern.split(transTocken); in decomposeImpl()
/libcore/ojluni/annotations/sdk/nullability/java/util/regex/
DPattern.annotated.java50 public java.lang.@libcore.util.NonNull String @libcore.util.NonNull [] split(@libcore.util.NonNull … in split() method in Pattern
52 public java.lang.@libcore.util.NonNull String @libcore.util.NonNull [] split(@libcore.util.NonNull … in split() method in Pattern
/libcore/ojluni/src/main/java/java/util/regex/
DPattern.java1142 public String[] split(CharSequence input, int limit) { in split() method in Pattern
1305 public String[] split(CharSequence input) { in split() method in Pattern
1306 return split(input, 0); in split()
/libcore/ojluni/src/main/java/java/util/stream/
DDoubleStream.java832 Spliterator.OfDouble split = new Streams.ConcatSpliterator.OfDouble( in concat() local
834 DoubleStream stream = StreamSupport.doubleStream(split, a.isParallel() || b.isParallel()); in concat()
DIntStream.java850 Spliterator.OfInt split = new Streams.ConcatSpliterator.OfInt( in concat() local
852 IntStream stream = StreamSupport.intStream(split, a.isParallel() || b.isParallel()); in concat()
DStreamSpliterators.java192 Spliterator<P_IN> split = spliterator.trySplit();
193 return (split == null) ? null : wrap(split);
976 T_SPLITR split = (T_SPLITR) s.trySplit(); in trySplit()
977 return split == null ? null : makeSpliterator(split); in trySplit()
1295 Spliterator<T> split = s.trySplit(); in trySplit() local
1296 return (split != null) ? new DistinctSpliterator<>(split, seen) : null; in trySplit()
/libcore/dalvik/src/main/java/dalvik/system/
DDexPathList.java316 for (String path : searchPath.split(File.pathSeparator)) { in splitPaths()
503 String split[] = path.split(zipSeparator, 2); in makePathElements() local
504 File zip = new File(split[0]); in makePathElements()
505 String dir = split[1]; in makePathElements()
/libcore/tools/upstream/
Dupstream-diff99 repositories = args.repositories.split(',')

1234