Home
last modified time | relevance | path

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

12345

/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/ojluni/src/test/java/lang/String/
DSplit.java54 String[] result = SOURCE.split(Integer.toString(x), limit); in testSplit_byDigit()
91 String[] result = SOURCE.split("e", limit);
104 String[] result = source.split("e", 0);
195 "abc".split(regex);
215 if (!Arrays.equals(src.split(regex, limit),
216 p.split(src, limit)))
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/
DPatternTest.java98 assertEquals(",,".split(",", 3).length, 3); in testSplitCharSequenceBug6193()
99 assertEquals(",,".split(",", 4).length, 3); in testSplitCharSequenceBug6193()
103 assertEquals(Pattern.compile("o").split("boo:and:foo", 5).length, 5); in testSplitCharSequenceBug5391()
104 assertEquals(Pattern.compile("b").split("ab", -1).length, 2); in testSplitCharSequenceBug5391()
111 s = pat.split("zxx:zzz:zxx", 10); in testSplitCharSequence()
113 s = pat.split("zxx:zzz:zxx", 3); in testSplitCharSequence()
115 s = pat.split("zxx:zzz:zxx", -1); in testSplitCharSequence()
117 s = pat.split("zxx:zzz:zxx", 0); in testSplitCharSequence()
121 s = pat.split("abccbadfebb"); in testSplitCharSequence()
123 s = pat.split(""); in testSplitCharSequence()
[all …]
/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/main/java/sun/nio/fs/
DAbstractFileSystemProvider.java47 private static String[] split(String attribute) { in split() method in AbstractFileSystemProvider
75 String[] s = split(attribute); in setAttribute()
88 String[] s = split(attributes); in readAttributes()
94 return view.readAttributes(s[1].split(",")); in readAttributes()
DUnixMountEntry.java69 for (String opt: Util.split(optionsAsString, ',')) { in hasOption()
/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/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/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/
DSpliteratorTestHelper.java389 Spliterator<T> split = spliterator.trySplit(); in testSplitAfterFullTraversal() local
390 assertNull(split); in testSplitAfterFullTraversal()
395 split = spliterator.trySplit(); in testSplitAfterFullTraversal()
396 assertNull(split); in testSplitAfterFullTraversal()
402 split = spliterator.trySplit(); in testSplitAfterFullTraversal()
403 assertNull(split); in testSplitAfterFullTraversal()
466 Spliterator<T> split = spliterator.trySplit(); in splitSixDeepVisitor() local
467 if (split != null) { in splitSixDeepVisitor()
468 assertSpliterator(split, rootCharacteristics); in splitSixDeepVisitor()
473 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/luni/src/test/java/libcore/java/util/
DSplittableRandomTest.java46 assertThrows(NullPointerException.class, () -> random.split(/* source= */ null)); in split_throwsNPE_whenSourceIsNull()
75 var splitRandom1 = random1.split(new SplittableRandom(sourceSeed)); in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource()
76 var splitRandom2 = random2.split(new SplittableRandom(sourceSeed)); in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource()
/libcore/ojluni/src/main/java/java/util/
DArraysParallelSortHelpers.java188 T split = a[(lh = ln >>> 1) + lb]; in compute() local
191 if (c.compare(split, a[rm + rb]) <= 0) in compute()
201 T split = a[(rh = rn >>> 1) + rb]; in compute() local
204 if (c.compare(split, a[lm + lb]) <= 0) in compute()
DSplittableRandom.java236 public java.util.SplittableRandom split(SplittableGenerator source) { in split() method in SplittableRandom.AbstractSplittableGeneratorProxy
298 public SplittableRandom split() { in split() method in SplittableRandom
307 public SplittableRandom split(SplittableGenerator source) { in split() method in SplittableRandom
/libcore/ojluni/src/test/java/util/Collections/
DUnmodifiableMapEntrySet.java149 Spliterator<Map.Entry<Integer, Integer>> split = s.trySplit(); in testSpliterator() local
150 if (split != null) { in testSpliterator()
151 testWithEntryConsumer(sc.apply(split)); in testSpliterator()
/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/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(), Integer.valueOf(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(), Integer.valueOf(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(), Integer.valueOf(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(), Integer.valueOf(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/main/java/jdk/internal/util/random/
DRandomSupport.java2073 public SplittableGenerator split() { in split() method in RandomSupport.AbstractSplittableGenerator
2074 return this.split(this); in split()
2125 return new RandomIntsSpliterator(generatingGenerator.split(), i, m, origin, bound); in trySplit()
2171 return new RandomLongsSpliterator(generatingGenerator.split(), i, m, origin, bound); in trySplit()
2217 … return new RandomDoublesSpliterator(generatingGenerator.split(), i, m, origin, bound); in trySplit()
2267 … return new RandomSplitsSpliterator(generatingGenerator.split(), i, m, constructingGenerator); in trySplit()
2274 consumer.accept(constructingGenerator.split(generatingGenerator)); in tryAdvance()
2289 consumer.accept(c.split(r)); in forEachRemaining()
2417 public SplittableGenerator split(long brine) { in split() method in RandomSupport.AbstractSplittableWithBrineGenerator
2418 return this.split(this, brine); in split()
[all …]
/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/sun/security/util/
DAlgorithmDecomposer.java47 String[] transTokens = algorithm.split("/"); in decomposeImpl()
60 String[] tokens = PATTERN.split(transToken); in decomposeImpl()
/libcore/ojluni/annotations/flagged_api/java/util/
DSplittableRandom.annotated.java35 public java.util.SplittableRandom split() { throw new RuntimeException("Stub!"); } in split() method in SplittableRandom
38 public java.util.SplittableRandom split(java.util.random.RandomGenerator.SplittableGenerator source… in split() method in SplittableRandom

12345