Home
last modified time | relevance | path

Searched refs:str (Results 1 – 25 of 157) sorted by relevance

1234567

/libcore/ojluni/src/main/java/java/lang/
DStringBuilder.java112 public StringBuilder(String str) { in StringBuilder() argument
113 super(str.length() + 16); in StringBuilder()
114 append(str); in StringBuilder()
136 public StringBuilder append(String str) { in append() argument
137 super.append(str); in append()
181 public StringBuilder append(char[] str) { in append() argument
182 super.append(str); in append()
190 public StringBuilder append(char[] str, int offset, int len) { in append() argument
191 super.append(str, offset, len); in append()
262 public StringBuilder replace(int start, int end, String str) { in replace() argument
[all …]
DStringBuffer.java138 public StringBuffer(String str) { in StringBuffer() argument
139 super(str.length() + 16); in StringBuffer()
140 append(str); in StringBuffer()
268 public synchronized StringBuffer append(String str) { in append() argument
270 super.append(str); in append()
355 public synchronized StringBuffer append(char[] str) { in append() argument
357 super.append(str); in append()
365 public synchronized StringBuffer append(char[] str, int offset, int len) { in append() argument
367 super.append(str, offset, len); in append()
450 public synchronized StringBuffer replace(int start, int end, String str) { in replace() argument
[all …]
DAbstractStringBuilder.java444 public AbstractStringBuilder append(String str) { in append() argument
445 if (str == null) in append()
447 int len = str.length(); in append()
449 str.getChars(0, len, value, count); in append()
564 public AbstractStringBuilder append(char[] str) { in append() argument
565 int len = str.length; in append()
567 System.arraycopy(str, 0, value, count, len); in append()
594 public AbstractStringBuilder append(char str[], int offset, int len) { in append() argument
597 System.arraycopy(str, offset, value, count, len); in append()
849 public AbstractStringBuilder replace(int start, int end, String str) { in replace() argument
[all …]
DProcessEnvironment.java128 protected final String str; field in ProcessEnvironment.ExternalData
131 protected ExternalData(String str, byte[] bytes) { in ExternalData() argument
132 this.str = str; in ExternalData()
141 return str; in toString()
157 protected Variable(String str, byte[] bytes) { in Variable() argument
158 super(str, bytes); in Variable()
161 public static Variable valueOfQueryOnly(Object str) { in valueOfQueryOnly() argument
162 return valueOfQueryOnly((String) str); in valueOfQueryOnly()
165 public static Variable valueOfQueryOnly(String str) { in valueOfQueryOnly() argument
166 return new Variable(str, str.getBytes()); in valueOfQueryOnly()
[all …]
/libcore/ojluni/src/main/java/java/util/
DStringTokenizer.java107 private String str; field in StringTokenizer
194 public StringTokenizer(String str, String delim, boolean returnDelims) { in StringTokenizer() argument
198 this.str = str; in StringTokenizer()
199 maxPosition = str.length(); in StringTokenizer()
220 public StringTokenizer(String str, String delim) { in StringTokenizer() argument
221 this(str, delim, false); in StringTokenizer()
235 public StringTokenizer(String str) { in StringTokenizer() argument
236 this(str, " \t\n\r\f", false); in StringTokenizer()
251 char c = str.charAt(position); in skipDelimiters()
256 int c = str.codePointAt(position); in skipDelimiters()
[all …]
/libcore/ojluni/src/main/java/sun/invoke/util/
DBytecodeDescriptor.java48 String str = bytecodeSignature; in parseMethod() local
51 if (i[0] < end && str.charAt(i[0]) == '(') { in parseMethod()
53 while (i[0] < end && str.charAt(i[0]) != ')') { in parseMethod()
54 Class<?> pt = parseSig(str, i, end, loader); in parseMethod()
56 parseError(str, "bad argument type"); in parseMethod()
61 parseError(str, "not a method type"); in parseMethod()
63 Class<?> rtype = parseSig(str, i, end, loader); in parseMethod()
65 parseError(str, "bad return type"); in parseMethod()
70 static private void parseError(String str, String msg) { in parseError() argument
71 throw new IllegalArgumentException("bad signature: "+str+": "+msg); in parseError()
[all …]
/libcore/ojluni/src/main/java/java/nio/
DStringCharBuffer.java34 CharSequence str; field in StringCharBuffer
41 str = s; in StringCharBuffer()
45 return new StringCharBuffer(str, in slice()
60 str = s; in StringCharBuffer()
64 return new StringCharBuffer(str, markValue(), in duplicate()
73 return str.charAt(nextGetIndex() + offset); in get()
77 return str.charAt(checkIndex(index) + offset); in get()
81 return str.charAt(index + offset); in getUnchecked()
103 return str.toString().substring(start + offset, end + offset); in toString()
109 return new StringCharBuffer(str, in subSequence()
/libcore/support/src/test/java/tests/support/
DSupport_StringReader.java24 private String str; field in Support_StringReader
40 public Support_StringReader(String str) { in Support_StringReader() argument
41 super(str); in Support_StringReader()
42 this.str = str; in Support_StringReader()
43 this.count = str.length(); in Support_StringReader()
56 str = null; in close()
65 return str != null; in isOpen()
122 return str.charAt(pos++); in read()
159 str.getChars(pos, end, buf, offset); in read()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineResultStatusTest.java34 String[] str = {"BUFFER_OVERFLOW", "BUFFER_UNDERFLOW", "CLOSED", "OK"}; in test_SSLEngineResultStatus_values() local
36 if (enS.length == str.length) { in test_SSLEngineResultStatus_values()
39 for (int j = 0; j < str.length; j++) { in test_SSLEngineResultStatus_values()
40 if (enS[i].toString() == str[j]) { in test_SSLEngineResultStatus_values()
56 String[] str = {"BUFFER_OVERFLOW", "BUFFER_UNDERFLOW", "CLOSED", "OK"}; in test_SSLEngineResultStatus_valueOf() local
62 for (int i = 0; i < str.length; i++) { in test_SSLEngineResultStatus_valueOf()
64 enS = SSLEngineResult.Status.valueOf(str[i]); in test_SSLEngineResultStatus_valueOf()
65 assertEquals("Incorrect Status", enS.toString(), str[i]); in test_SSLEngineResultStatus_valueOf()
67 fail("Unexpected exception " + e + " was thrown for " + str[i]); in test_SSLEngineResultStatus_valueOf()
DSSLContextSpiTest.java61 String str = re.getMessage(); in test_engineCreateSSLEngine_01()
62 if (!str.equals("Not initialiazed")) in test_engineCreateSSLEngine_01()
63 fail("Incorrect exception message: " + str); in test_engineCreateSSLEngine_01()
80 String str = re.getMessage(); in test_engineCreateSSLEngine_02()
81 if (!str.equals("Not initialiazed")) in test_engineCreateSSLEngine_02()
82 fail("Incorrect exception message: " + str); in test_engineCreateSSLEngine_02()
111 String str = re.getMessage(); in test_commonTest_01()
112 if (!str.equals("Not initialiazed")) in test_commonTest_01()
113 fail("Incorrect exception message: " + str); in test_commonTest_01()
122 String str = re.getMessage(); in test_commonTest_01()
[all …]
DSSLEngineResultHandshakeStatusTest.java33 String[] str = {"NOT_HANDSHAKING", "FINISHED", "NEED_TASK", "NEED_WRAP", "NEED_UNWRAP"}; in test_SSLEngineResultHandshakeStatus_values() local
35 if (enS.length == str.length) { in test_SSLEngineResultHandshakeStatus_values()
38 assertEquals("Incorrect Status", enS[i].toString(), str[i]); in test_SSLEngineResultHandshakeStatus_values()
49 String[] str = {"FINISHED", "NEED_TASK", "NEED_UNWRAP", "NEED_WRAP", "NOT_HANDSHAKING"}; in test_SSLEngineResultStatus_valueOf() local
55 for (int i = 0; i < str.length; i++) { in test_SSLEngineResultStatus_valueOf()
57 enS = SSLEngineResult.HandshakeStatus.valueOf(str[i]); in test_SSLEngineResultStatus_valueOf()
58 assertEquals("Incorrect Status", enS.toString(), str[i]); in test_SSLEngineResultStatus_valueOf()
60 fail("Unexpected exception " + e + " was thrown for " + str[i]); in test_SSLEngineResultStatus_valueOf()
/libcore/luni/src/test/java/libcore/java/io/
DOldAndroidBufferedInputStreamTest.java32 String str = "AbCdEfGhIjKlM\nOpQrStUvWxYz"; in testBufferedInputStream() local
33 ByteArrayInputStream aa = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream()
34 ByteArrayInputStream ba = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream()
35 ByteArrayInputStream ca = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream()
36 ByteArrayInputStream da = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream()
37 ByteArrayInputStream ea = new ByteArrayInputStream(str.getBytes()); in testBufferedInputStream()
41 Assert.assertEquals(str, read(a)); in testBufferedInputStream()
76 assertEquals(str, read(e, 10000)); in testBufferedInputStream()
DOldAndroidLineNumberReaderTest.java32 String str = "AbCdEfGhIjKlM\nOpQrStUvWxYz"; in testLineNumberReader() local
34 StringReader aa = new StringReader(str); in testLineNumberReader()
35 StringReader ba = new StringReader(str); in testLineNumberReader()
36 StringReader ca = new StringReader(str); in testLineNumberReader()
37 StringReader da = new StringReader(str); in testLineNumberReader()
38 StringReader ea = new StringReader(str); in testLineNumberReader()
43 Assert.assertEquals(str, read(a)); in testLineNumberReader()
DOldAndroidStringReaderTest.java28 String str = "AbCdEfGhIjKlMnOpQrStUvWxYz"; in testStringReader() local
30 StringReader a = new StringReader(str); in testStringReader()
31 StringReader b = new StringReader(str); in testStringReader()
32 StringReader c = new StringReader(str); in testStringReader()
33 StringReader d = new StringReader(str); in testStringReader()
35 Assert.assertEquals(str, read(a)); in testStringReader()
DOldAndroidCharArrayReaderTest.java31 String str = "AbCdEfGhIjKlMnOpQrStUvWxYz"; in testCharArrayReader() local
32 CharArrayReader a = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
33 CharArrayReader b = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
34 CharArrayReader c = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
35 CharArrayReader d = new CharArrayReader(str.toCharArray()); in testCharArrayReader()
37 Assert.assertEquals(str, read(a)); in testCharArrayReader()
DOldAndroidByteArrayInputStreamTest.java31 String str = "AbCdEfGhIjKlMnOpQrStUvWxYz"; in testByteArrayInputStream() local
33 ByteArrayInputStream a = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream()
34 ByteArrayInputStream b = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream()
35 ByteArrayInputStream c = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream()
36 ByteArrayInputStream d = new ByteArrayInputStream(str.getBytes()); in testByteArrayInputStream()
38 Assert.assertEquals(str, read(a)); in testByteArrayInputStream()
/libcore/luni/src/test/java/libcore/java/lang/
DOldStringTest.java171 String str = "!'123123.123HelloWorld!123123helloworld#"; in test_replaceAll() local
181 results[i], str.replaceAll(patterns[i], "?")); in test_replaceAll()
185 str.replaceAll("[abc*", "?"); in test_replaceAll()
194 String str = "!'123123.123HelloWorld!123123helloworld#"; in test_replaceFirst() local
204 results[i], str.replaceFirst(patterns[i], "?")); in test_replaceFirst()
208 str.replaceFirst("[abc*", "?"); in test_replaceFirst()
217 String str = "!'123123.123HelloWorld!123123helloworld#"; in test_splitLString() local
225 patterns[i], Arrays.equals(results[i], str.split(patterns[i]))); in test_splitLString()
229 str.split("[a}"); in test_splitLString()
238 String str = "!'123123.123HelloWorld!123123helloworld#"; in test_splitLStringLint() local
[all …]
/libcore/ojluni/src/main/native/
Dio_util.h90 jstring _##var##str = (strexp); \
91 if (_##var##str == NULL) { \
95 var = JNU_GetStringPlatformChars((env), _##var##str, NULL); \
106 JNU_ReleaseStringPlatformChars(env, _##var##str, var); \
118 jstring _##var##str = (strexp); \
119 if (_##var##str == NULL) { \
123 var = (*(env))->GetStringChars((env), _##var##str, NULL); \
127 (*(env))->ReleaseStringChars(env, _##var##str, var); \
/libcore/ojluni/src/main/java/java/io/
DStringReader.java38 private String str; field in StringReader
49 this.str = s; in StringReader()
55 if (str == null) in ensureOpen()
72 return str.charAt(next++); in read()
100 str.getChars(next, next + n, cbuf, off); in read()
199 str = null; in close()
DWriter.java156 public void write(String str) throws IOException { in write() argument
157 write(str, 0, str.length()); in write()
180 public void write(String str, int off, int len) throws IOException { in write() argument
191 str.getChars(off, (off + len), cbuf, 0); in write()
/libcore/luni/src/test/java/libcore/java/util/
DOldTimeZoneTest.java66 String[] str = TimeZone.getAvailableIDs(); in test_getAvailableIDs() local
67 assertNotNull(str); in test_getAvailableIDs()
68 assertTrue(str.length != 0); in test_getAvailableIDs()
69 for(int i = 0; i < str.length; i++) { in test_getAvailableIDs()
70 assertNotNull(TimeZone.getTimeZone(str[i])); in test_getAvailableIDs()
75 String[] str = TimeZone.getAvailableIDs(0); in test_getAvailableIDsI() local
76 assertNotNull(str); in test_getAvailableIDsI()
77 assertTrue(str.length != 0); in test_getAvailableIDsI()
78 for(int i = 0; i < str.length; i++) { in test_getAvailableIDsI()
79 assertNotNull(TimeZone.getTimeZone(str[i])); in test_getAvailableIDsI()
/libcore/ojluni/annotations/hiddenapi/java/lang/
DAbstractStringBuilder.java105 public java.lang.AbstractStringBuilder append(java.lang.String str) { in append() argument
129 public java.lang.AbstractStringBuilder append(char[] str) { in append() argument
133 public java.lang.AbstractStringBuilder append(char[] str, int offset, int len) { in append() argument
173 public java.lang.AbstractStringBuilder replace(int start, int end, java.lang.String str) { in replace() argument
189 public java.lang.AbstractStringBuilder insert(int index, char[] str, int offset, int len) { in insert() argument
197 public java.lang.AbstractStringBuilder insert(int offset, java.lang.String str) { in insert() argument
201 public java.lang.AbstractStringBuilder insert(int offset, char[] str) { in insert() argument
238 public int indexOf(java.lang.String str) { in indexOf() argument
242 public int indexOf(java.lang.String str, int fromIndex) { in indexOf() argument
246 public int lastIndexOf(java.lang.String str) { in lastIndexOf() argument
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DMockEnum.java32 String str; field in MockEnum
41 str = "test"; in MockEnum()
51 if (str.equals(test.str) && i == test.i && samEnum == test.samEnum) { in equals()
DMockEnum2.java33 String str; field in MockEnum2
44 str = "test"; in MockEnum2()
54 if (str.equals(test.str) && i == test.i && samEnum == test.samEnum in equals()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DReadOnlyCharBufferTest.java166 String str = String.valueOf(new char[buf.capacity()]); in testPutStringintint() local
168 buf.put(str, 0, str.length()); in testPutStringintint()
180 buf.put(str, -1, str.length()); in testPutStringintint()
195 String str = " "; in testPutString() local
197 buf.put(str); in testPutString()

1234567