Home
last modified time | relevance | path

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

123

/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/
DSplitTest.java13 String[] results = p.split("have/you/done/it/right"); in testSimple()
20 assertArraysEqual(new String[0], "hello".split(".")); in testEmptySplits()
21 assertArraysEqual(new String[] { "1", "2" }, "1:2:".split(":")); in testEmptySplits()
23 assertArraysEqual(new String[0], ":".split(":")); in testEmptySplits()
25 assertArraysEqual(new String[] { "1", "2", "" }, "1:2:".split(":", -1)); in testEmptySplits()
28 assertArraysEqual(new String[] { "", "", "o" }, "hello".split("..")); in testEmptySplits()
31 assertArraysEqual(new String[] { "hello" }, "hello".split("not-present-in-test")); in testEmptySplits()
34 assertArraysEqual(new String[] { "" }, "".split("not-present-in-test")); in testEmptySplits()
35 assertArraysEqual(new String[] { "" }, "".split("A?")); in testEmptySplits()
42 assertArraysEqual(new String[] { "a", "b", "c" }, "a,b,c".split(",", 0)); in testEmptySplits()
[all …]
DPatternTest.java82 assertEquals(",,".split(",", 3).length, 3); in testSplitCharSequenceInt()
83 assertEquals(",,".split(",", 4).length, 3); in testSplitCharSequenceInt()
86 assertEquals(Pattern.compile("o").split("boo:and:foo", 5).length, 5); in testSplitCharSequenceInt()
87 assertEquals(Pattern.compile("b").split("ab", -1).length, 2); in testSplitCharSequenceInt()
91 s = pat.split("zxx:zzz:zxx", 10); in testSplitCharSequenceInt()
93 s = pat.split("zxx:zzz:zxx", 3); in testSplitCharSequenceInt()
95 s = pat.split("zxx:zzz:zxx", -1); in testSplitCharSequenceInt()
97 s = pat.split("zxx:zzz:zxx", 0); in testSplitCharSequenceInt()
102 s = pat.split("abccbadfebb", -1); in testSplitCharSequenceInt()
104 s = pat.split("", -1); in testSplitCharSequenceInt()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/
DSplitTest.java33 String[] results = p.split("have/you/done/it/right"); in testSimple()
47 tokens = p.split(input, 1); in testSplit1()
50 tokens = p.split(input, 2); in testSplit1()
54 tokens = p.split(input, 5); in testSplit1()
58 tokens = p.split(input, -2); in testSplit1()
62 tokens = p.split(input, 0); in testSplit1()
66 tokens = p.split(input); in testSplit1()
73 tokens = p.split(input, 1); in testSplit1()
76 tokens = p.split(input, 2); in testSplit1()
80 tokens = p.split(input, 5); in testSplit1()
[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/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.java222 patterns[i], Arrays.equals(results[i], str.split(patterns[i]))); in test_splitLString()
226 str.split("[a}"); in test_splitLString()
241 Arrays.equals(results[0], str.split(pattern, 4))); in test_splitLStringLint()
243 Arrays.equals(results[1], str.split(pattern, 9))); in test_splitLStringLint()
245 Arrays.equals(results[1], str.split(pattern, 0))); in test_splitLStringLint()
247 Arrays.equals(results[1], str.split(pattern, -1))); in test_splitLStringLint()
249 Arrays.equals(results[1], str.split(pattern, 10))); in test_splitLStringLint()
251 Arrays.equals(results[1], str.split(pattern, Integer.MAX_VALUE))); in test_splitLStringLint()
254 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/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/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/libcore/net/http/
DResponseUtils.java65 String[] fields = contentTypeHeader.split(";"); in parseContentTypeParameters()
72 final String[] components = parameter.split("="); in parseContentTypeParameters()
/libcore/luni/src/test/java/libcore/java/net/
DNetworkInterfaceTest.java204 String[] split = s.split(": |@"); in testGetNetworkInterfaces() local
206 if (split.length > 2) { in testGetNetworkInterfaces()
207 expectedNiNames.add(split[1]); in testGetNetworkInterfaces()
/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()
DAbstractAlgorithmConstraints.java64 algorithmsInProperty = property.split(","); in getAlgorithms()
/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/luni/src/test/java/libcore/util/
DTimeZoneDataFilesTest.java44 String[] paths = icuDataPath.split(":"); in generateIcuDataPath_includesTimeZoneOverride()
/libcore/ojluni/src/main/java/java/util/regex/
DPattern.java1111 public String[] split(CharSequence input, int limit) { in split() method in Pattern
1260 public String[] split(CharSequence input) { in split() method in Pattern
1261 return split(input, 0); in split()
/libcore/dalvik/src/main/java/dalvik/system/
DDexPathList.java267 for (String path : searchPath.split(File.pathSeparator)) { in splitPaths()
437 String split[] = path.split(zipSeparator, 2); in makePathElements() local
438 File zip = new File(split[0]); in makePathElements()
439 String dir = split[1]; in makePathElements()
/libcore/ojluni/src/main/java/java/util/stream/
DDoubleStream.java830 Spliterator.OfDouble split = new Streams.ConcatSpliterator.OfDouble( in concat() local
832 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()

123