Home
last modified time | relevance | path

Searched refs:maxsplit (Results 1 – 25 of 44) sorted by relevance

12

/external/python/cpython3/Objects/clinic/
Dbytesobject.c.h23 bytes_split_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
32 Py_ssize_t maxsplit = -1; in bytes_split() local
35 &sep, &maxsplit)) { in bytes_split()
38 return_value = bytes_split_impl(self, sep, maxsplit); in bytes_split()
142 bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
151 Py_ssize_t maxsplit = -1; in bytes_rsplit() local
154 &sep, &maxsplit)) { in bytes_rsplit()
157 return_value = bytes_rsplit_impl(self, sep, maxsplit); in bytes_rsplit()
Dbytearrayobject.c.h188 Py_ssize_t maxsplit);
197 Py_ssize_t maxsplit = -1; in bytearray_split() local
200 &sep, &maxsplit)) { in bytearray_split()
203 return_value = bytearray_split_impl(self, sep, maxsplit); in bytearray_split()
262 Py_ssize_t maxsplit);
271 Py_ssize_t maxsplit = -1; in bytearray_rsplit() local
274 &sep, &maxsplit)) { in bytearray_rsplit()
277 return_value = bytearray_rsplit_impl(self, sep, maxsplit); in bytearray_rsplit()
/external/python/cpython2/Lib/
Dstringold.py104 def split(s, sep=None, maxsplit=0): argument
115 return s.split(sep, maxsplit)
402 def replace(s, old, new, maxsplit=0): argument
410 return s.replace(old, new, maxsplit)
DUserString.py107 def replace(self, old, new, maxsplit=-1): argument
108 return self.__class__(self.data.replace(old, new, maxsplit))
118 def split(self, sep=None, maxsplit=-1): argument
119 return self.data.split(sep, maxsplit)
120 def rsplit(self, sep=None, maxsplit=-1): argument
121 return self.data.rsplit(sep, maxsplit)
Dstring.py283 def split(s, sep=None, maxsplit=-1): argument
294 return s.split(sep, maxsplit)
298 def rsplit(s, sep=None, maxsplit=-1): argument
307 return s.rsplit(sep, maxsplit)
Dre.py168 def split(pattern, string, maxsplit=0, flags=0): argument
171 return _compile(pattern, flags).split(string, maxsplit)
/external/python/cpython2/Modules/
Dstropmodule.c30 split_whitespace(char *s, Py_ssize_t len, Py_ssize_t maxsplit) in split_whitespace() argument
63 if (maxsplit && (countsplit >= maxsplit) && i < len) { in split_whitespace()
100 Py_ssize_t splitcount, maxsplit; in strop_splitfields() local
108 maxsplit = 0; in strop_splitfields()
109 if (!PyArg_ParseTuple(args, "t#|z#n:split", &s, &len, &sub, &n, &maxsplit)) in strop_splitfields()
112 return split_whitespace(s, len, maxsplit); in strop_splitfields()
134 if (maxsplit && (splitcount >= maxsplit)) in strop_splitfields()
/external/python/cpython3/Objects/stringlib/
Dsplit.h17 #define PREALLOC_SIZE(maxsplit) \ argument
18 (maxsplit >= MAX_PREALLOC ? MAX_PREALLOC : maxsplit+1)
/external/python/cpython2/Objects/stringlib/
Dsplit.h20 #define PREALLOC_SIZE(maxsplit) \ argument
21 (maxsplit >= MAX_PREALLOC ? MAX_PREALLOC : maxsplit+1)
/external/skia/tools/skpbench/
D_adb_path.py20 return pathname.rsplit('/', maxsplit=1)[-1]
/external/skqp/tools/skpbench/
D_adb_path.py20 return pathname.rsplit('/', maxsplit=1)[-1]
/external/python/cpython3/Lib/test/
Dstring_tests.py414 'a|b|c|d', 'split', '|', maxsplit=1)
416 'a|b|c|d', 'split', sep='|', maxsplit=1)
418 'a|b|c|d', 'split', maxsplit=1, sep='|')
420 'a b c d', 'split', maxsplit=1)
484 'a|b|c|d', 'rsplit', '|', maxsplit=1)
486 'a|b|c|d', 'rsplit', sep='|', maxsplit=1)
488 'a|b|c|d', 'rsplit', maxsplit=1, sep='|')
490 'a b c d', 'rsplit', maxsplit=1)
Dtest_re.py356 self.assertEqual(re.split(":", ":a:b::c", maxsplit=2), ['', 'a', 'b::c'])
357 self.assertEqual(re.split(':', 'a:b:c:d', maxsplit=2), ['a', 'b', 'c:d'])
358 self.assertEqual(re.split("(:)", ":a:b::c", maxsplit=2),
360 self.assertEqual(re.split("(:+)", ":a:b::c", maxsplit=2),
363 self.assertEqual(re.split("(:*)", ":a:b::c", maxsplit=2),
1679 pat.split(string='abracadabra', maxsplit=1),
/external/python/cpython3/Modules/clinic/
D_sre.c.h288 Py_ssize_t maxsplit, PyObject *source);
297 Py_ssize_t maxsplit = 0; in _sre_SRE_Pattern_split() local
301 &string, &maxsplit, &source)) { in _sre_SRE_Pattern_split()
304 return_value = _sre_SRE_Pattern_split_impl(self, string, maxsplit, source); in _sre_SRE_Pattern_split()
/external/python/cpython3/Objects/
Dbytearrayobject.c1348 Py_ssize_t maxsplit) in bytearray_split_impl() argument
1356 if (maxsplit < 0) in bytearray_split_impl()
1357 maxsplit = PY_SSIZE_T_MAX; in bytearray_split_impl()
1360 return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit); in bytearray_split_impl()
1368 (PyObject*) self, s, len, sub, n, maxsplit in bytearray_split_impl()
1458 Py_ssize_t maxsplit) in bytearray_rsplit_impl() argument
1466 if (maxsplit < 0) in bytearray_rsplit_impl()
1467 maxsplit = PY_SSIZE_T_MAX; in bytearray_rsplit_impl()
1470 return stringlib_rsplit_whitespace((PyObject*) self, s, len, maxsplit); in bytearray_rsplit_impl()
1478 (PyObject*) self, s, len, sub, n, maxsplit in bytearray_rsplit_impl()
Dbytesobject.c1765 bytes_split_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit) in bytes_split_impl() argument
1773 if (maxsplit < 0) in bytes_split_impl()
1774 maxsplit = PY_SSIZE_T_MAX; in bytes_split_impl()
1776 return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit); in bytes_split_impl()
1782 list = stringlib_split((PyObject*) self, s, len, sub, n, maxsplit); in bytes_split_impl()
1850 bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit) in bytes_rsplit_impl() argument
1858 if (maxsplit < 0) in bytes_rsplit_impl()
1859 maxsplit = PY_SSIZE_T_MAX; in bytes_rsplit_impl()
1861 return stringlib_rsplit_whitespace((PyObject*) self, s, len, maxsplit); in bytes_rsplit_impl()
1867 list = stringlib_rsplit((PyObject*) self, s, len, sub, n, maxsplit); in bytes_rsplit_impl()
/external/python/cpython3/Lib/
Dre.py204 def split(pattern, string, maxsplit=0, flags=0): argument
212 return _compile(pattern, flags).split(string, maxsplit)
/external/python/cpython2/Objects/
Dbytearrayobject.c2073 Py_ssize_t maxsplit = -1; in bytearray_split() local
2078 if (!PyArg_ParseTuple(args, "|On:split", &subobj, &maxsplit)) in bytearray_split()
2080 if (maxsplit < 0) in bytearray_split()
2081 maxsplit = PY_SSIZE_T_MAX; in bytearray_split()
2084 return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit); in bytearray_split()
2092 (PyObject*) self, s, len, sub, n, maxsplit in bytearray_split()
2166 Py_ssize_t maxsplit = -1; in bytearray_rsplit() local
2171 if (!PyArg_ParseTuple(args, "|On:rsplit", &subobj, &maxsplit)) in bytearray_rsplit()
2173 if (maxsplit < 0) in bytearray_rsplit()
2174 maxsplit = PY_SSIZE_T_MAX; in bytearray_rsplit()
[all …]
Dstringobject.c1456 Py_ssize_t maxsplit = -1; in string_split() local
1460 if (!PyArg_ParseTuple(args, "|On:split", &subobj, &maxsplit)) in string_split()
1462 if (maxsplit < 0) in string_split()
1463 maxsplit = PY_SSIZE_T_MAX; in string_split()
1465 return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit); in string_split()
1472 return PyUnicode_Split((PyObject *)self, subobj, maxsplit); in string_split()
1477 return stringlib_split((PyObject*) self, s, len, sub, n, maxsplit); in string_split()
1555 Py_ssize_t maxsplit = -1; in string_rsplit() local
1559 if (!PyArg_ParseTuple(args, "|On:rsplit", &subobj, &maxsplit)) in string_rsplit()
1561 if (maxsplit < 0) in string_rsplit()
[all …]
/external/python/cpython3/Lib/collections/
D__init__.py1215 def replace(self, old, new, maxsplit=-1): argument
1220 return self.__class__(self.data.replace(old, new, maxsplit))
1233 def split(self, sep=None, maxsplit=-1): argument
1234 return self.data.split(sep, maxsplit)
1235 def rsplit(self, sep=None, maxsplit=-1): argument
1236 return self.data.rsplit(sep, maxsplit)
/external/python/cpython2/Doc/library/
Dstring.rst911 .. function:: split(s[, sep[, maxsplit]])
919 If *maxsplit* is given, at most *maxsplit* number of splits occur, and the
921 the list will have at most ``maxsplit+1`` elements). If *maxsplit* is not
931 .. function:: rsplit(s[, sep[, maxsplit]])
935 :func:`split`, except when the optional third argument *maxsplit* is explicitly
936 specified and nonzero. If *maxsplit* is given, at most *maxsplit* number of
939 ``maxsplit+1`` elements).
944 .. function:: splitfields(s[, sep[, maxsplit]])
Dre.rst563 .. function:: split(pattern, string, maxsplit=0, flags=0)
567 as part of the resulting list. If *maxsplit* is nonzero, at most *maxsplit*
570 *maxsplit* was ignored. This has been fixed in later releases.)
766 .. method:: RegexObject.split(string, maxsplit=0)
1183 number, and address. We use the ``maxsplit`` parameter of :func:`split`
1196 occur in the result list. With a ``maxsplit`` of ``4``, we could separate the
/external/python/cpython2/Include/
Dunicodeobject.h1164 Py_ssize_t maxsplit /* Maxsplit count */
1208 Py_ssize_t maxsplit /* Maxsplit count */
/external/python/cpython3/Doc/library/
Dstdtypes.rst1815 .. method:: str.rsplit(sep=None, maxsplit=-1)
1818 If *maxsplit* is given, at most *maxsplit* splits are done, the *rightmost*
1837 .. method:: str.split(sep=None, maxsplit=-1)
1840 string. If *maxsplit* is given, at most *maxsplit* splits are done (thus,
1841 the list will have at most ``maxsplit+1`` elements). If *maxsplit* is not
1855 >>> '1,2,3'.split(',', maxsplit=1)
1871 >>> '1 2 3'.split(maxsplit=1)
2732 .. method:: bytes.rsplit(sep=None, maxsplit=-1)
2733 bytearray.rsplit(sep=None, maxsplit=-1)
2736 as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits
[all …]
/external/python/cpython3/Include/
Dunicodeobject.h1913 Py_ssize_t maxsplit /* Maxsplit count */
1957 Py_ssize_t maxsplit /* Maxsplit count */

12