Home
last modified time | relevance | path

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

123456

/third_party/node/deps/icu-small/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.cpp142 void Edits::addReplace(int32_t oldLength, int32_t newLength) { in addReplace() argument
144 if(oldLength < 0 || newLength < 0) { in addReplace()
148 if (oldLength == 0 && newLength == 0) { in addReplace()
152 int32_t newDelta = newLength - oldLength; in addReplace()
164 newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) { in addReplace()
166 int32_t u = (oldLength << 12) | (newLength << 9); in addReplace()
179 if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) { in addReplace()
181 head |= newLength; in addReplace()
195 if(newLength < LENGTH_IN_1TRAIL) { in addReplace()
196 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()
1211 int32_t newLength) in findAndReplace() argument
1219 newText.pinIndices(newStart, newLength); in findAndReplace()
1232 replace(pos, oldLength, newText, newStart, newLength); in findAndReplace()
1234 start = pos + newLength; in findAndReplace()
1508 int32_t newLength = oldLength - length; in doReplace() local
1509 if(srcLength > (INT32_MAX - newLength)) { in doReplace()
[all …]
Dcharstr.cpp94 CharString &CharString::truncate(int32_t newLength) { in truncate() argument
95 if(newLength<0) { in truncate()
96 newLength=0; in truncate()
98 if(newLength<len) { in truncate()
99 buffer[len=newLength]=0; in truncate()
/third_party/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.cpp142 void Edits::addReplace(int32_t oldLength, int32_t newLength) { in addReplace() argument
144 if(oldLength < 0 || newLength < 0) { in addReplace()
148 if (oldLength == 0 && newLength == 0) { in addReplace()
152 int32_t newDelta = newLength - oldLength; in addReplace()
164 newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) { in addReplace()
166 int32_t u = (oldLength << 12) | (newLength << 9); in addReplace()
179 if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) { in addReplace()
181 head |= newLength; in addReplace()
195 if(newLength < LENGTH_IN_1TRAIL) { in addReplace()
196 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.cpp94 CharString &CharString::truncate(int32_t newLength) { in truncate() argument
95 if(newLength<0) { in truncate()
96 newLength=0; in truncate()
98 if(newLength<len) { in truncate()
99 buffer[len=newLength]=0; in truncate()
/third_party/skia/third_party/externals/icu/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.cpp142 void Edits::addReplace(int32_t oldLength, int32_t newLength) { in addReplace() argument
144 if(oldLength < 0 || newLength < 0) { in addReplace()
148 if (oldLength == 0 && newLength == 0) { in addReplace()
152 int32_t newDelta = newLength - oldLength; in addReplace()
164 newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) { in addReplace()
166 int32_t u = (oldLength << 12) | (newLength << 9); in addReplace()
179 if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) { in addReplace()
181 head |= newLength; in addReplace()
195 if(newLength < LENGTH_IN_1TRAIL) { in addReplace()
196 head |= newLength; in addReplace()
[all …]
Dunistr.cpp357 int32_t getGrowCapacity(int32_t newLength) { in getGrowCapacity() argument
358 int32_t growSize = (newLength >> 2) + kGrowSize; in getGrowCapacity()
359 if(growSize <= (kMaxCapacity - newLength)) { in getGrowCapacity()
360 return newLength + growSize; in getGrowCapacity()
1168 int32_t newLength) in findAndReplace() argument
1176 newText.pinIndices(newStart, newLength); in findAndReplace()
1189 replace(pos, oldLength, newText, newStart, newLength); in findAndReplace()
1191 start = pos + newLength; in findAndReplace()
1465 int32_t newLength = oldLength - length; in doReplace() local
1466 if(srcLength > (INT32_MAX - newLength)) { in doReplace()
[all …]
/third_party/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()
/third_party/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.java184 int newLength=bytesLength+1; in write() local
185 ensureCapacity(newLength); in write()
186 bytesLength=newLength; in write()
198 int newLength=bytesLength+length; in write() local
199 ensureCapacity(newLength); in write()
200 bytesLength=newLength; in write()
209 int newLength=bytesLength+length; in write() local
210 ensureCapacity(newLength); in write()
211 bytesLength=newLength; in write()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/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()
/third_party/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 …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/text/
DEdits.java139 public void addReplace(int oldLength, int newLength) { in addReplace() argument
140 if(oldLength < 0 || newLength < 0) { in addReplace()
142 "addReplace(" + oldLength + ", " + newLength + in addReplace()
145 if (oldLength == 0 && newLength == 0) { in addReplace()
149 int newDelta = newLength - oldLength; in addReplace()
160 newLength <= MAX_SHORT_CHANGE_NEW_LENGTH) { in addReplace()
162 int u = (oldLength << 12) | (newLength << 9); in addReplace()
175 if (oldLength < LENGTH_IN_1TRAIL && newLength < LENGTH_IN_1TRAIL) { in addReplace()
177 head |= newLength; in addReplace()
191 if(newLength < LENGTH_IN_1TRAIL) { in addReplace()
[all …]
/third_party/node/deps/v8/src/builtins/
Darray-shift.tq19 const newLength = array.length - 1;
23 if ((newLength + newLength + kMinAddedElementsCapacity) <
30 if (newLength > kMaxCopyElements) goto Runtime;
33 witness.ChangeLength(newLength);
34 witness.MoveElements(0, 1, Convert<intptr>(newLength));
35 witness.StoreHole(newLength);
Dtyped-array-subarray.tq48 // 12. Let newLength be max(endIndex - beginIndex, 0).
49 const newLength: uintptr = Unsigned(IntPtrMax(Signed(end - begin), 0));
64 // 17. Let argumentsList be « buffer, beginByteOffset, newLength ».
67 methodName, source, buffer, beginByteOffset, newLength);
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/lang/
DUCharacterCaseTest.java812 private int oldLength, newLength; field in UCharacterCaseTest.EditChange
813 EditChange(boolean change, int oldLength, int newLength) { in EditChange() argument
816 this.newLength = newLength; in EditChange()
822 return "" + ei.oldLength() + "->" + ei.newLength(); in printOneEdit()
824 return "" + ei.oldLength() + "=" + ei.newLength(); in printOneEdit()
842 int prevDestIndex = destIndex - expected[i].newLength; in srcIndexFromDest()
869 int prevDestIndex = destIndex - expected[i].newLength; in destIndexFromSrc()
918 assertEquals(msg, expect.newLength, ei1.newLength()); in checkEditsIter()
928 assertEquals(msg, expect.newLength, ei2.newLength()); in checkEditsIter()
940 if (expect.newLength > 0) { in checkEditsIter()
[all …]
/third_party/node/deps/icu-small/source/i18n/
Dformatted_string_builder.cpp291 int32_t newLength; in prepareForInsertHelper() local
292 if (uprv_add32_overflow(fLength, count, &newLength)) { in prepareForInsertHelper()
297 if (newLength > oldCapacity) { in prepareForInsertHelper()
298 if (newLength > INT32_MAX / 2) { in prepareForInsertHelper()
305 int32_t newCapacity = newLength * 2; in prepareForInsertHelper()
306 newZero = (newCapacity - newLength) / 2; in prepareForInsertHelper()
340 newZero = (oldCapacity - newLength) / 2; in prepareForInsertHelper()
355 fLength = newLength; in prepareForInsertHelper()
/third_party/icu/icu4c/source/i18n/
Dformatted_string_builder.cpp291 int32_t newLength; in prepareForInsertHelper() local
292 if (uprv_add32_overflow(fLength, count, &newLength)) { in prepareForInsertHelper()
297 if (newLength > oldCapacity) { in prepareForInsertHelper()
298 if (newLength > INT32_MAX / 2) { in prepareForInsertHelper()
305 int32_t newCapacity = newLength * 2; in prepareForInsertHelper()
306 newZero = (newCapacity - newLength) / 2; in prepareForInsertHelper()
340 newZero = (oldCapacity - newLength) / 2; in prepareForInsertHelper()
355 fLength = newLength; in prepareForInsertHelper()
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/
DUCharacterCaseTest.java895 private int oldLength, newLength; field in UCharacterCaseTest.EditChange
896 EditChange(boolean change, int oldLength, int newLength) { in EditChange() argument
899 this.newLength = newLength; in EditChange()
905 return "" + ei.oldLength() + "->" + ei.newLength(); in printOneEdit()
907 return "" + ei.oldLength() + "=" + ei.newLength(); in printOneEdit()
925 int prevDestIndex = destIndex - expected[i].newLength; in srcIndexFromDest()
952 int prevDestIndex = destIndex - expected[i].newLength; in destIndexFromSrc()
1001 assertEquals(msg, expect.newLength, ei1.newLength()); in checkEditsIter()
1011 assertEquals(msg, expect.newLength, ei2.newLength()); in checkEditsIter()
1023 if (expect.newLength > 0) { in checkEditsIter()
[all …]

123456