Lines Matching defs:start
74 [clinic start generated code]*/
88 [python start generated code]*/
273 Py_ssize_t start, Py_ssize_t length)
275 assert(0 <= start);
281 Py_UCS1 *to = (Py_UCS1 *)data + start;
288 Py_UCS2 *to = (Py_UCS2 *)data + start;
296 Py_UCS4 * to = (Py_UCS4 *)data + start;
2086 Py_UCS2 *start = (Py_UCS2 *)data + index;
2087 Py_UCS2 *ucs2 = start;
2092 assert((ucs2 - start) <= PyUnicode_GET_LENGTH(unicode));
2096 Py_UCS4 *start = (Py_UCS4 *)data + index;
2097 Py_UCS4 *ucs4 = start;
2102 assert((ucs4 - start) <= PyUnicode_GET_LENGTH(unicode));
2492 _PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end)
2498 assert(0 <= start);
2500 assert(start <= end);
2502 if (start == 0 && end == PyUnicode_GET_LENGTH(unicode))
2505 if (start == end)
2514 startptr = (char *)startptr + start * kind;
2679 const Py_UCS1 *start = (const Py_UCS1 *) data;
2680 _PyUnicode_CONVERT_BYTES(Py_UCS1, Py_UCS4, start, start + len, target);
2683 const Py_UCS2 *start = (const Py_UCS2 *) data;
2684 _PyUnicode_CONVERT_BYTES(Py_UCS2, Py_UCS4, start, start + len, target);
4911 const char * start;
4929 start = out = PyBytes_AS_STRING(v);
4993 if (_PyBytes_Resize(&v, out - start) < 0)
5041 ascii_decode(const char *start, const char *end, Py_UCS1 *dest)
5043 const char *p = start;
5067 return p - start;
5090 memcpy(dest, start, p - start);
5091 return p - start;
5161 errmsg = "invalid start byte";
5261 non-NULL, write the start of the illegal byte sequence into *wlen. If reason
5347 *reason = "invalid start byte";
5614 const char *start = writer.use_small_buffer ? writer.small_buffer :
5616 Py_ssize_t len = end - start;
5626 memcpy(cache, start, len);
6323 Unicode string, so we start with size here and then reduce the
6477 const char *start = ++s;
6485 namelen = s - start;
6491 ucnhash_capi->getcode(start, (int)namelen,
6730 Unicode string, so we start with size here and then reduce the
8364 [clinic start generated code]*/
8378 [clinic start generated code]*/
9371 /* helper macro to fixup start/end slice values */
9372 #define ADJUST_INDICES(start, end, len) \
9380 if (start < 0) { \
9381 start += len; \
9382 if (start < 0) \
9383 start = 0; \
9388 Py_ssize_t start,
9403 ADJUST_INDICES(start, end, len1);
9404 if (end - start < len2)
9411 result = findchar((const char *)buf1 + kind1*start,
9412 kind1, end - start, ch, direction);
9416 return start + result;
9429 result = asciilib_find_slice(buf1, len1, buf2, len2, start, end);
9431 result = ucs1lib_find_slice(buf1, len1, buf2, len2, start, end);
9434 result = ucs2lib_find_slice(buf1, len1, buf2, len2, start, end);
9437 result = ucs4lib_find_slice(buf1, len1, buf2, len2, start, end);
9447 result = asciilib_rfind_slice(buf1, len1, buf2, len2, start, end);
9449 result = ucs1lib_rfind_slice(buf1, len1, buf2, len2, start, end);
9452 result = ucs2lib_rfind_slice(buf1, len1, buf2, len2, start, end);
9455 result = ucs4lib_rfind_slice(buf1, len1, buf2, len2, start, end);
9618 Py_ssize_t start,
9636 ADJUST_INDICES(start, end, len1);
9637 if (end - start < len2)
9652 ((const Py_UCS1*)buf1) + start, end - start,
9657 ((const Py_UCS1*)buf1) + start, end - start,
9663 ((const Py_UCS2*)buf1) + start, end - start,
9669 ((const Py_UCS4*)buf1) + start, end - start,
9692 Py_ssize_t start,
9699 return any_find_slice(str, substr, start, end, direction);
9704 Py_ssize_t start, Py_ssize_t end,
9712 ADJUST_INDICES(start, end, len);
9713 if (end - start < 1)
9716 result = findchar(PyUnicode_1BYTE_DATA(str) + kind*start,
9717 kind, end-start, ch, direction);
9721 return start + result;
9727 Py_ssize_t start,
9743 ADJUST_INDICES(start, end, PyUnicode_GET_LENGTH(self));
9745 if (end < start)
9760 offset = start;
9794 Py_ssize_t start,
9801 return tailmatch(str, substr, start, end, direction);
10235 _PyUnicode_FastFill(PyObject *unicode, Py_ssize_t start, Py_ssize_t length,
10243 assert(start >= 0);
10244 assert(start + length <= PyUnicode_GET_LENGTH(unicode));
10245 unicode_fill(kind, data, fill_char, start, length);
10249 PyUnicode_Fill(PyObject *unicode, Py_ssize_t start, Py_ssize_t length,
10263 if (start < 0) {
10274 maxlen = PyUnicode_GET_LENGTH(unicode) - start;
10279 _PyUnicode_FastFill(unicode, start, length, fill_char);
10890 More specifically, words start with uppercased characters and all remaining
10892 [clinic start generated code]*/
10910 [clinic start generated code]*/
10927 [clinic start generated code]*/
10975 [clinic start generated code]*/
11573 Py_ssize_t *start, Py_ssize_t *end)
11576 start, end)) {
11585 "S.count(sub[, start[, end]]) -> int\n\
11588 string S[start:end]. Optional arguments start and end are\n\
11595 Py_ssize_t start = 0;
11602 if (!parse_args_finds_unicode("count", args, &substring, &start, &end))
11612 ADJUST_INDICES(start, end, len1);
11613 if (end - start < len2)
11626 ((const Py_UCS1*)buf1) + start, end - start,
11632 ((const Py_UCS2*)buf1) + start, end - start,
11638 ((const Py_UCS4*)buf1) + start, end - start,
11668 [clinic start generated code]*/
11685 [clinic start generated code]*/
11767 "S.find(sub[, start[, end]]) -> int\n\
11770 such that sub is contained within S[start:end]. Optional\n\
11771 arguments start and end are interpreted as in slice notation.\n\
11780 Py_ssize_t start = 0;
11784 if (!parse_args_finds_unicode("find", args, &substring, &start, &end))
11790 result = any_find_slice(self, substring, start, end, 1);
11844 "S.index(sub[, start[, end]]) -> int\n\
11847 such that sub is contained within S[start:end]. Optional\n\
11848 arguments start and end are interpreted as in slice notation.\n\
11858 Py_ssize_t start = 0;
11861 if (!parse_args_finds_unicode("index", args, &substring, &start, &end))
11867 result = any_find_slice(self, substring, start, end, 1);
11887 [clinic start generated code]*/
11906 [clinic start generated code]*/
11951 [clinic start generated code]*/
11996 [clinic start generated code]*/
12054 [clinic start generated code]*/
12094 [clinic start generated code]*/
12133 [clinic start generated code]*/
12175 [clinic start generated code]*/
12214 [clinic start generated code]*/
12254 [clinic start generated code]*/
12305 start with letters and underscore, continue with
12383 [clinic start generated code]*/
12399 [clinic start generated code]*/
12440 [clinic start generated code]*/
12467 [clinic start generated code]*/
12486 [clinic start generated code]*/
12560 PyUnicode_Substring(PyObject *self, Py_ssize_t start, Py_ssize_t end)
12572 if (start == 0 && end == length)
12575 if (start < 0 || end < 0) {
12579 if (start >= length || end < start)
12582 length = end - start;
12585 return _PyUnicode_FromASCII((const char*)(data + start), length);
12591 data + kind * start,
12689 [clinic start generated code]*/
12708 [clinic start generated code]*/
12727 [clinic start generated code]*/
12820 [clinic start generated code]*/
12842 [clinic start generated code]*/
12870 [clinic start generated code]*/
13053 "S.rfind(sub[, start[, end]]) -> int\n\
13056 such that sub is contained within S[start:end]. Optional\n\
13057 arguments start and end are interpreted as in slice notation.\n\
13066 Py_ssize_t start = 0;
13070 if (!parse_args_finds_unicode("rfind", args, &substring, &start, &end))
13076 result = any_find_slice(self, substring, start, end, -1);
13085 "S.rindex(sub[, start[, end]]) -> int\n\
13088 such that sub is contained within S[start:end]. Optional\n\
13089 arguments start and end are interpreted as in slice notation.\n\
13098 Py_ssize_t start = 0;
13102 if (!parse_args_finds_unicode("rindex", args, &substring, &start, &end))
13108 result = any_find_slice(self, substring, start, end, -1);
13131 [clinic start generated code]*/
13174 [clinic start generated code]*/
13308 [clinic start generated code]*/
13328 [clinic start generated code]*/
13352 [clinic start generated code]*/
13378 [clinic start generated code]*/
13397 [clinic start generated code]*/
13430 [clinic start generated code]*/
13551 [clinic start generated code]*/
13564 [clinic start generated code]*/
13586 [clinic start generated code]*/
13626 "S.startswith(prefix[, start[, end]]) -> bool\n\
13629 With optional start, test S beginning at that position.\n\
13639 Py_ssize_t start = 0;
13643 if (!stringlib_parse_args_finds("startswith", args, &subobj, &start, &end))
13656 result = tailmatch(self, substring, start, end, -1);
13672 result = tailmatch(self, subobj, start, end, -1);
13680 "S.endswith(suffix[, start[, end]]) -> bool\n\
13683 With optional start, test S beginning at that position.\n\
13693 Py_ssize_t start = 0;
13697 if (!stringlib_parse_args_finds("endswith", args, &subobj, &start, &end))
13710 result = tailmatch(self, substring, start, end, +1);
13725 result = tailmatch(self, subobj, start, end, +1);
13926 Py_ssize_t start, Py_ssize_t end)
13934 assert(0 <= start);
13936 assert(start <= end);
13941 if (start == 0 && end == PyUnicode_GET_LENGTH(str))
13945 maxchar = _PyUnicode_FindMaxChar(str, start, end);
13948 len = end - start;
13954 str, start, len);
14092 [clinic start generated code]*/
14118 [clinic start generated code]*/
14254 Py_ssize_t start, stop, step, slicelength, i;
14262 if (PySlice_Unpack(item, &start, &stop, &step) < 0) {
14266 &start, &stop, step);
14270 } else if (start == 0 && step == 1 &&
14275 start, start + slicelength);
14283 for (cur = start, i = 0; i < slicelength; cur += step, i++) {
14300 for (cur = start, i = 0; i < slicelength; cur += step, i++) {
15278 [clinic start generated code]*/