Home
last modified time | relevance | path

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

12

/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.java25 "this,is,a,simple,example".split(","); in timeStringSplitComma()
31 "this.is.a.simple.example".split("\\."); in timeStringSplitLiteralDot()
37 "this\nis\na\nsimple\nexample\n".split("\n"); in timeStringSplitNewline()
44 p.split("this,is,a,simple,example"); in timePatternSplitComma()
51 p.split("this.is.a.simple.example"); in timePatternSplitLiteralDot()
57 "this,is,a,harder,example".split("[,]"); in timeStringSplitHard()
/libcore/luni/src/test/java/libcore/java/util/
DLocaleInternalsTest.java70 Locale.parseUnicodeExtension("foooo".split("-"), keywords, attributes); in test_parseUnicodeExtension()
76 Locale.parseUnicodeExtension("foooo-baa-baaabaaa".split("-"), in test_parseUnicodeExtension()
86 Locale.parseUnicodeExtension("ko-koko".split("-"), keywords, attributes); in test_parseUnicodeExtension()
92 Locale.parseUnicodeExtension("ko-koko-kokoko".split("-"), keywords, attributes); in test_parseUnicodeExtension()
98 Locale.parseUnicodeExtension("ko-koko-kokoko-ba-baba-bababa".split("-"), in test_parseUnicodeExtension()
107 Locale.parseUnicodeExtension("attri1-attri2-k1-type1-type1-k2-type2".split("-"), in test_parseUnicodeExtension()
/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/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/luni/src/main/java/java/util/regex/
DPattern.java328 public String[] split(CharSequence input, int limit) { in split() method in Pattern
329 return Splitter.split(this, pattern, input.toString(), limit); in split()
335 public String[] split(CharSequence input) { in split() method in Pattern
336 return split(input, 0); in split()
DSplitter.java104 public static String[] split(Pattern pattern, String re, String input, int limit) { in split() method in Splitter
/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/main/java/java/util/
DLocale.java463 String[] subTags = normalizedVariant.split("_"); in normalizeAndValidateVariant()
686 final String[] subtags = normalizedValue.split("-"); in setExtension()
1365 String split[] = splitIllformedVariant(variantCode); in makeLanguageTag()
1367 variant = split[0]; in makeLanguageTag()
1368 illFormedVariantSubtags = split[1]; in makeLanguageTag()
1448 final String[] subTags = normalizedVariant.split("-"); in splitIllformedVariant()
1450 final String[] split = new String[] { "", "" }; in splitIllformedVariant() local
1474 return split; in splitIllformedVariant()
1499 split[0] = concatenateRange(subTags, 0, firstIllformedSubtag); in splitIllformedVariant()
1500 split[1] = concatenateRange(subTags, firstIllformedSubtag, firstInvalidSubtag); in splitIllformedVariant()
[all …]
DUUID.java185 String[] parts = uuid.split("-"); in fromString()
/libcore/jsr166-tests/src/test/java/jsr166/
DConcurrentLinkedDequeTest.java741 int split = rng.nextInt(max-1) + 1; in testIteratorRemove() local
745 for (int j = 1; j <= split; ++j) in testIteratorRemove()
748 assertEquals(it.next(), new Integer(split+1)); in testIteratorRemove()
749 for (int j = 1; j <= split; ++j) in testIteratorRemove()
752 for (int j = split+1; j <= max; ++j) { in testIteratorRemove()
809 int split = rng.nextInt(max-1) + 1; in testDescendingIteratorRemove() local
813 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
816 assertEquals(it.next(), new Integer(split+1)); in testDescendingIteratorRemove()
817 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
820 for (int j = split+1; j <= max; ++j) { in testDescendingIteratorRemove()
DArrayDequeTest.java771 int split = rng.nextInt(max-1) + 1; in testIteratorRemove() local
775 for (int j = 1; j <= split; ++j) in testIteratorRemove()
778 assertEquals(it.next(), new Integer(split+1)); in testIteratorRemove()
779 for (int j = 1; j <= split; ++j) in testIteratorRemove()
782 for (int j = split+1; j <= max; ++j) { in testIteratorRemove()
839 int split = rng.nextInt(max-1) + 1; in testDescendingIteratorRemove() local
843 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
846 assertEquals(it.next(), new Integer(split+1)); in testDescendingIteratorRemove()
847 for (int j = 1; j <= split; ++j) in testDescendingIteratorRemove()
850 for (int j = split+1; j <= max; ++j) { in testDescendingIteratorRemove()
/libcore/luni/src/main/java/java/lang/
DPackage.java250 String[] requested = version.split("\\."); in isCompatibleWith()
251 String[] provided = specVersion.split("\\."); in isCompatibleWith()
/libcore/luni/src/main/java/libcore/net/url/
DFtpURLConnection.java111 int split = parse.indexOf(':'); in FtpURLConnection() local
112 if (split >= 0) { in FtpURLConnection()
113 username = parse.substring(0, split); in FtpURLConnection()
114 password = parse.substring(split + 1); in FtpURLConnection()
/libcore/luni/src/main/java/java/sql/
DDate.java222 String[] parts = dateString.split("-"); in valueOf()
DDriverManager.java84 String[] theDriverNames = theDriverList.split(":"); in loadInitialDrivers()
/libcore/luni/src/test/java/libcore/java/math/
DCSVTest.java51 String[] testCase = line.split(","); in TestCSVInputs()
/libcore/support/src/test/java/tests/util/
DClassLoaderBuilder.java142 for (String pathElement : classpath.split(File.pathSeparator)) { in classpathToUrls()
/libcore/support/src/test/java/tests/support/
DSupport_Exec.java56 builder.command().addAll(Arrays.asList(testVMArgs.split("\\s+"))); in javaProcessBuilder()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DProcessTest.java43 for (String line : readAndCloseStream(ps.getInputStream()).split("\n")) { in test_55017()
/libcore/luni/src/main/java/libcore/icu/
DTimeZoneNames.java147 for (String line : ZoneInfoDB.getInstance().getZoneTab().split("\n")) { in forLocale()
DICU.java190 final String[] extensions = extensionsString.split(";"); in localeFromIcuLocaleId()
195 for (String unicodeAttribute : unicodeAttributeValues.split("-")) { in localeFromIcuLocaleId()
/libcore/luni/src/main/java/libcore/reflect/
DTypes.java137 String as[] = c.getName().split("\\["); in appendGenericType()

12