Home
last modified time | relevance | path

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

/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()
D_sre.c2257 Py_ssize_t maxsplit = 0; in pattern_split() local
2263 &string, &maxsplit, &string2)) in pattern_split()
2283 while (!maxsplit || n < maxsplit) { in pattern_split()
/external/skia/tools/skpbench/
D_adb_path.py20 return pathname.rsplit('/', maxsplit=1)[-1]
/external/python/cpython2/Objects/stringlib/
Dsplit.h20 #define PREALLOC_SIZE(maxsplit) \ argument
21 (maxsplit >= MAX_PREALLOC ? MAX_PREALLOC : maxsplit+1)
/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 …]
Dunicodeobject.c7457 Py_ssize_t maxsplit) in PyUnicode_Split() argument
7472 result = split((PyUnicodeObject *)s, (PyUnicodeObject *)sep, maxsplit); in PyUnicode_Split()
7588 Py_ssize_t maxsplit) in PyUnicode_RSplit() argument
7603 result = rsplit((PyUnicodeObject *)s, (PyUnicodeObject *)sep, maxsplit); in PyUnicode_RSplit()
/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
Dstdtypes.rst1158 .. method:: str.rsplit([sep [,maxsplit]])
1161 If *maxsplit* is given, at most *maxsplit* splits are done, the *rightmost*
1185 .. method:: str.split([sep[, maxsplit]])
1188 string. If *maxsplit* is given, at most *maxsplit* splits are done (thus,
1189 the list will have at most ``maxsplit+1`` elements). If *maxsplit* is not
/external/python/cpython2/Include/
Dunicodeobject.h1164 Py_ssize_t maxsplit /* Maxsplit count */
1208 Py_ssize_t maxsplit /* Maxsplit count */
/external/python/cpython2/Misc/
Dcheatsheet490 new[, maxsplit]) old replaced by new.
499 ,maxsplit]]) delimiter string.
534 (9) If the optional argument maxsplit is given, only the first maxsplit
537 If maxsplit is given, at most maxsplit splits are done.
1598 maxsplit=0]])
1602 new[, maxsplit=0] substring<old> replaced by <new>. Limits to <maxsplit>
1695 maxsplit=0]) also returned.
1744 maxsplit=
DHISTORY9331 space=" " first. Note that the maxsplit argument defaults in
12441 - An optional 4th (maxsplit) argument to strop.replace().
12443 - Fixed handling of maxsplit in string.splitfields().
13789 [maxsplit]) which does substring replacements. It is actually
/external/python/cpython2/Doc/howto/
Dregex.rst1067 .. method:: .split(string [, maxsplit=0])
1072 part of the resulting list. If *maxsplit* is nonzero, at most *maxsplit* splits
1075 You can limit the number of splits made, by passing a value for *maxsplit*.
1076 When *maxsplit* is nonzero, at most *maxsplit* splits will be made, and the
/external/python/cpython2/Doc/c-api/
Dunicode.rst997 .. c:function:: PyObject* PyUnicode_Split(PyObject *s, PyObject *sep, Py_ssize_t maxsplit)
1001 separator. At most *maxsplit* splits will be done. If negative, no limit is
1005 This function used an :c:type:`int` type for *maxsplit*. This might require
/external/python/cpython2/Doc/data/
Drefcounts.dat1661 PyUnicode_Split:int:maxsplit::
1665 PyUnicode_Splitlines:int:maxsplit::
/external/devlib/devlib/
Dtarget.py733 parts = re.split(r'\s+', line, maxsplit=8)
/external/python/cpython2/Lib/test/
Dtest_re.py1094 pat.split(string='abracadabra', maxsplit=1),