diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2006-05-26 08:54:28 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2006-05-26 08:54:28 (GMT) |
commit | 06a69dd8ffcbac16e7f5c81b457c40ca4ce94c00 (patch) | |
tree | 96534671057ec865841680a25ef0af247b012a7b /Include/unicodeobject.h | |
parent | 19bebf2e2fd6121435c3af26fbd857f1994df8bd (diff) | |
download | cpython-06a69dd8ffcbac16e7f5c81b457c40ca4ce94c00.zip cpython-06a69dd8ffcbac16e7f5c81b457c40ca4ce94c00.tar.gz cpython-06a69dd8ffcbac16e7f5c81b457c40ca4ce94c00.tar.bz2 |
needforspeed: partition implementation, part two.
feel free to improve the documentation and the docstrings.
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r-- | Include/unicodeobject.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 82a0232..6645782 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -184,6 +184,7 @@ typedef PY_UNICODE_TYPE Py_UNICODE; # define PyUnicode_GetMax PyUnicodeUCS2_GetMax # define PyUnicode_GetSize PyUnicodeUCS2_GetSize # define PyUnicode_Join PyUnicodeUCS2_Join +# define PyUnicode_Partition PyUnicodeUCS2_Partition # define PyUnicode_Replace PyUnicodeUCS2_Replace # define PyUnicode_Resize PyUnicodeUCS2_Resize # define PyUnicode_SetDefaultEncoding PyUnicodeUCS2_SetDefaultEncoding @@ -259,6 +260,7 @@ typedef PY_UNICODE_TYPE Py_UNICODE; # define PyUnicode_GetMax PyUnicodeUCS4_GetMax # define PyUnicode_GetSize PyUnicodeUCS4_GetSize # define PyUnicode_Join PyUnicodeUCS4_Join +# define PyUnicode_Partition PyUnicodeUCS4_Partition # define PyUnicode_Replace PyUnicodeUCS4_Replace # define PyUnicode_Resize PyUnicodeUCS4_Resize # define PyUnicode_SetDefaultEncoding PyUnicodeUCS4_SetDefaultEncoding @@ -1018,6 +1020,13 @@ PyAPI_FUNC(PyObject*) PyUnicode_Splitlines( int keepends /* If true, line end markers are included */ ); +/* Partition a string using a given separator. */ + +PyAPI_FUNC(PyObject*) PyUnicode_Partition( + PyObject *s, /* String to partition */ + PyObject *sep /* String separator */ + ); + /* Split a string giving a list of Unicode strings. If sep is NULL, splitting will be done at all whitespace |