Home
last modified time | relevance | path

Searched refs:newLength (Results 1 – 25 of 88) sorted by relevance

1234

/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/util/
DArrays.java809 public static byte[] copyOf(byte[] data, int newLength) in copyOf() argument
811 byte[] tmp = new byte[newLength]; in copyOf()
813 if (newLength < data.length) in copyOf()
815 System.arraycopy(data, 0, tmp, 0, newLength); in copyOf()
825 public static char[] copyOf(char[] data, int newLength) in copyOf() argument
827 char[] tmp = new char[newLength]; in copyOf()
829 if (newLength < data.length) in copyOf()
831 System.arraycopy(data, 0, tmp, 0, newLength); in copyOf()
841 public static int[] copyOf(int[] data, int newLength) in copyOf() argument
843 int[] tmp = new int[newLength]; in copyOf()
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/util/
DArrays.java811 public static byte[] copyOf(byte[] data, int newLength) in copyOf() argument
813 byte[] tmp = new byte[newLength]; in copyOf()
815 if (newLength < data.length) in copyOf()
817 System.arraycopy(data, 0, tmp, 0, newLength); in copyOf()
827 public static char[] copyOf(char[] data, int newLength) in copyOf() argument
829 char[] tmp = new char[newLength]; in copyOf()
831 if (newLength < data.length) in copyOf()
833 System.arraycopy(data, 0, tmp, 0, newLength); in copyOf()
843 public static int[] copyOf(int[] data, int newLength) in copyOf() argument
845 int[] tmp = new int[newLength]; in copyOf()
[all …]
/external/oj-libjdwp/src/share/npt/
Dutf.c147 int newLength; in utf8sToUtf8mLength() local
150 newLength = 0; in utf8sToUtf8mLength()
156 newLength++; in utf8sToUtf8mLength()
158 newLength++; /* We gain one byte in length on NULL bytes */ in utf8sToUtf8mLength()
166 newLength += 2; in utf8sToUtf8mLength()
174 newLength += 3; in utf8sToUtf8mLength()
183 newLength += 6; /* 4byte encoding turns into 2 3byte ones */ in utf8sToUtf8mLength()
193 return newLength; in utf8sToUtf8mLength()
203 utf8sToUtf8m(struct UtfInst *ui, jbyte *string, int length, jbyte *newString, int newLength) in utf8sToUtf8m() argument
255 UTF_ASSERT(j==newLength); in utf8sToUtf8m()
[all …]
/external/icu/icu4c/source/common/
Dunistr_case.cpp104 int32_t newLength; in caseMap() local
139 newLength = stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR in caseMap()
143 setLength(newLength); in caseMap()
170 newLength = oldLength + edits.lengthDelta(); in caseMap()
171 if (newLength > oldLength && !cloneArrayIfNeeded(newLength, newLength)) { in caseMap()
176 replacementChars, ei.replacementIndex(), ei.newLength()); in caseMap()
184 newLength = oldLength + edits.lengthDelta(); in caseMap()
197 if (!cloneArrayIfNeeded(newLength, newLength, FALSE, &bufferToDelete, TRUE)) { in caseMap()
202 newLength = stringCaseMapper(caseLocale, options, UCASEMAP_BREAK_ITERATOR in caseMap()
209 setLength(newLength); in caseMap()
Dedits.cpp141 void Edits::addReplace(int32_t oldLength, int32_t newLength) { in addReplace() argument
143 if(oldLength < 0 || newLength < 0) { in addReplace()
147 if (oldLength == 0 && newLength == 0) { in addReplace()
151 int32_t newDelta = newLength - oldLength; in addReplace()
163 newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) { in addReplace()
165 int32_t u = (oldLength << 12) | (newLength << 9); in addReplace()
178 if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) { in addReplace()
180 head |= newLength; in addReplace()
194 if(newLength < LENGTH_IN_1TRAIL) { in addReplace()
195 head |= newLength; in addReplace()
[all …]
Dunistr.cpp358 int32_t getGrowCapacity(int32_t newLength) { in getGrowCapacity() argument
359 int32_t growSize = (newLength >> 2) + kGrowSize; in getGrowCapacity()
360 if(growSize <= (kMaxCapacity - newLength)) { in getGrowCapacity()
361 return newLength + growSize; in getGrowCapacity()
1169 int32_t newLength) in findAndReplace() argument
1177 newText.pinIndices(newStart, newLength); in findAndReplace()
1190 replace(pos, oldLength, newText, newStart, newLength); in findAndReplace()
1192 start = pos + newLength; in findAndReplace()
1466 int32_t newLength = oldLength - length; in doReplace() local
1467 if(srcLength > (INT32_MAX - newLength)) { in doReplace()
[all …]
Dcharstr.cpp55 CharString &CharString::truncate(int32_t newLength) { in truncate() argument
56 if(newLength<0) { in truncate()
57 newLength=0; in truncate()
59 if(newLength<len) { in truncate()
60 buffer[len=newLength]=0; in truncate()
/external/icu/icu4c/source/test/intltest/
Dtestutil.cpp76 return UnicodeString() + ei.oldLength() + u"->" + ei.newLength(); in printOneEdit()
78 return UnicodeString() + ei.oldLength() + u"=" + ei.newLength(); in printOneEdit()
96 int32_t prevDestIndex = destIndex - expected[i].newLength; in srcIndexFromDest()
123 int32_t prevDestIndex = destIndex - expected[i].newLength; in destIndexFromSrc()
185 test.assertEquals(msg + u":" + __LINE__, expect.newLength, ei1.newLength()); in checkEditsIter()
195 test.assertEquals(msg + u":" + __LINE__, expect.newLength, ei2.newLength()); in checkEditsIter()
207 if (expect.newLength > 0) { in checkEditsIter()
211 test.assertEquals(msg + u":" + __LINE__, expect.newLength, ei2.newLength()); in checkEditsIter()
224 expDestIndex += expect.newLength; in checkEditsIter()
226 expReplIndex += expect.newLength; in checkEditsIter()
[all …]
Dwinnmtst.cpp198 int newLength = GetCurrencyFormatW(lcid, 0, nBuffer, NULL, NULL, 0); in getWindowsFormat() local
200 buffer = NEW_ARRAY(wchar_t, newLength); in getWindowsFormat()
202 GetCurrencyFormatW(lcid, 0, nBuffer, NULL, buffer, newLength); in getWindowsFormat()
212 int newLength = GetNumberFormatW(lcid, 0, nBuffer, NULL, NULL, 0); in getWindowsFormat() local
214 buffer = NEW_ARRAY(wchar_t, newLength); in getWindowsFormat()
216 GetNumberFormatW(lcid, 0, nBuffer, NULL, buffer, newLength); in getWindowsFormat()
/external/proguard/src/proguard/classfile/editor/
DConstantPoolSorter.java78 int newLength = 1; in visitProgramClass() local
89 newIndex = newLength; in visitProgramClass()
94 newConstantPool[newLength++] = constant; in visitProgramClass()
101 newConstantPool[newLength++] = null; in visitProgramClass()
112 System.arraycopy(newConstantPool, 0, programClass.constantPool, 0, newLength); in visitProgramClass()
115 Arrays.fill(programClass.constantPool, newLength, constantPoolCount, null); in visitProgramClass()
117 programClass.u2constantPoolCount = newLength; in visitProgramClass()
/external/icu/android_icu4j/src/main/java/android/icu/util/
DCharsTrieBuilder.java155 int newLength=charsLength+1; in write() local
156 ensureCapacity(newLength); in write()
157 charsLength=newLength; in write()
169 int newLength=charsLength+length; in write() local
170 ensureCapacity(newLength); in write()
171 charsLength=newLength; in write()
180 int newLength=charsLength+length; in write() local
181 ensureCapacity(newLength); in write()
182 charsLength=newLength; in write()
DBytesTrieBuilder.java177 int newLength=bytesLength+1; in write() local
178 ensureCapacity(newLength); in write()
179 bytesLength=newLength; in write()
191 int newLength=bytesLength+length; in write() local
192 ensureCapacity(newLength); in write()
193 bytesLength=newLength; in write()
202 int newLength=bytesLength+length; in write() local
203 ensureCapacity(newLength); in write()
204 bytesLength=newLength; in write()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DCharsTrieBuilder.java159 int newLength=charsLength+1; in write() local
160 ensureCapacity(newLength); in write()
161 charsLength=newLength; in write()
173 int newLength=charsLength+length; in write() local
174 ensureCapacity(newLength); in write()
175 charsLength=newLength; in write()
184 int newLength=charsLength+length; in write() local
185 ensureCapacity(newLength); in write()
186 charsLength=newLength; in write()
DBytesTrieBuilder.java181 int newLength=bytesLength+1; in write() local
182 ensureCapacity(newLength); in write()
183 bytesLength=newLength; in write()
195 int newLength=bytesLength+length; in write() local
196 ensureCapacity(newLength); in write()
197 bytesLength=newLength; in write()
206 int newLength=bytesLength+length; in write() local
207 ensureCapacity(newLength); in write()
208 bytesLength=newLength; in write()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DEdits.java144 public void addReplace(int oldLength, int newLength) { in addReplace() argument
145 if(oldLength < 0 || newLength < 0) { in addReplace()
147 "addReplace(" + oldLength + ", " + newLength + in addReplace()
150 if (oldLength == 0 && newLength == 0) { in addReplace()
154 int newDelta = newLength - oldLength; in addReplace()
165 newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) { in addReplace()
167 int u = (oldLength << 12) | (newLength << 9); in addReplace()
180 if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) { in addReplace()
182 head |= newLength; in addReplace()
196 if(newLength < LENGTH_IN_1TRAIL) { in addReplace()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/text/
DEdits.java138 public void addReplace(int oldLength, int newLength) { in addReplace() argument
139 if(oldLength < 0 || newLength < 0) { in addReplace()
141 "addReplace(" + oldLength + ", " + newLength + in addReplace()
144 if (oldLength == 0 && newLength == 0) { in addReplace()
148 int newDelta = newLength - oldLength; in addReplace()
159 newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) { in addReplace()
161 int u = (oldLength << 12) | (newLength << 9); in addReplace()
174 if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) { in addReplace()
176 head |= newLength; in addReplace()
190 if(newLength < LENGTH_IN_1TRAIL) { in addReplace()
[all …]
/external/proguard/src/proguard/evaluation/value/
DInstructionOffsetValue.java160 int newLength = thisValues.length; in generalize() local
165 newLength++; in generalize()
171 if (newLength == otherValues.length) in generalize()
180 if (newLength == this.values.length && in generalize()
189 int[] newValues = new int[newLength]; in generalize()
192 if (newLength == thisValues.length + otherValues.length) in generalize()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/utils/
DSeekableInMemoryByteChannel.java168 private void resize(int newLength) { in resize() argument
173 if (newLength < NAIVE_RESIZE_LIMIT) { in resize()
174 while (len < newLength) { in resize()
178 len = newLength; in resize()
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/
DRecyclableBufferedInputStream.java147 int newLength = localBuf.length * 2; in fillbuf() local
148 if (newLength > marklimit) { in fillbuf()
149 newLength = marklimit; in fillbuf()
152 Log.d(TAG, "allocate buffer of length: " + newLength); in fillbuf()
154 byte[] newbuf = new byte[newLength]; in fillbuf()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/
DUCharacterCaseTest.java796 private int oldLength, newLength; field in UCharacterCaseTest.EditChange
797 EditChange(boolean change, int oldLength, int newLength) { in EditChange() argument
800 this.newLength = newLength; in EditChange()
806 return "" + ei.oldLength() + "->" + ei.newLength(); in printOneEdit()
808 return "" + ei.oldLength() + "=" + ei.newLength(); in printOneEdit()
826 int prevDestIndex = destIndex - expected[i].newLength; in srcIndexFromDest()
853 int prevDestIndex = destIndex - expected[i].newLength; in destIndexFromSrc()
902 assertEquals(msg, expect.newLength, ei1.newLength()); in checkEditsIter()
912 assertEquals(msg, expect.newLength, ei2.newLength()); in checkEditsIter()
924 if (expect.newLength > 0) { in checkEditsIter()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/lang/
DUCharacterCaseTest.java799 private int oldLength, newLength; field in UCharacterCaseTest.EditChange
800 EditChange(boolean change, int oldLength, int newLength) { in EditChange() argument
803 this.newLength = newLength; in EditChange()
809 return "" + ei.oldLength() + "->" + ei.newLength(); in printOneEdit()
811 return "" + ei.oldLength() + "=" + ei.newLength(); in printOneEdit()
829 int prevDestIndex = destIndex - expected[i].newLength; in srcIndexFromDest()
856 int prevDestIndex = destIndex - expected[i].newLength; in destIndexFromSrc()
905 assertEquals(msg, expect.newLength, ei1.newLength()); in checkEditsIter()
915 assertEquals(msg, expect.newLength, ei2.newLength()); in checkEditsIter()
927 if (expect.newLength > 0) { in checkEditsIter()
[all …]
/external/smali/util/src/main/java/org/jf/util/
DStringWrapper.java175 private static String[] addString(@Nonnull String[] arr, String str, int index, int newLength) {
177 arr = enlargeArray(arr, newLength);
184 private static String[] enlargeArray(String[] arr, int newLength) {
185 String[] newArr = new String[newLength];
/external/skqp/src/pdf/
DSkPDFMakeCIDGlyphWidthsArray.cpp99 size_t newLength; in finish_range() local
101 newLength = range->fEndId - range->fStartId + 1; in finish_range()
106 newLength = 1; in finish_range()
108 SkASSERT(range->fAdvance.size() >= newLength); in finish_range()
109 range->fAdvance.resize(newLength); in finish_range()
/external/skia/src/pdf/
DSkPDFMakeCIDGlyphWidthsArray.cpp99 size_t newLength; in finish_range() local
101 newLength = range->fEndId - range->fStartId + 1; in finish_range()
106 newLength = 1; in finish_range()
108 SkASSERT(range->fAdvance.size() >= newLength); in finish_range()
109 range->fAdvance.resize(newLength); in finish_range()
/external/icu/icu4c/source/i18n/
Dwinnmfmt.cpp414 … int newLength = GetCurrencyFormatEx(localeName, 0, nBuffer, &formatInfo.currency, NULL, 0); in format() local
416 buffer = NEW_ARRAY(wchar_t, newLength); in format()
418 … GetCurrencyFormatEx(localeName, 0, nBuffer, &formatInfo.currency, buffer, newLength); in format()
434 … int newLength = GetNumberFormatEx(localeName, 0, nBuffer, &formatInfo.number, NULL, 0); in format() local
436 buffer = NEW_ARRAY(wchar_t, newLength); in format()
438 GetNumberFormatEx(localeName, 0, nBuffer, &formatInfo.number, buffer, newLength); in format()

1234