diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2006-05-26 18:15:38 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2006-05-26 18:15:38 (GMT) |
commit | b3167cbcd76652f9f5f64196ce371562bcd8d42c (patch) | |
tree | acf09b264580d12fa754dafd9cee44eee5ac236f /Include | |
parent | be9f219e40fb0b817bd248234a0b89727b1295e3 (diff) | |
download | cpython-b3167cbcd76652f9f5f64196ce371562bcd8d42c.zip cpython-b3167cbcd76652f9f5f64196ce371562bcd8d42c.tar.gz cpython-b3167cbcd76652f9f5f64196ce371562bcd8d42c.tar.bz2 |
needforspeed: added rpartition implementation
Diffstat (limited to 'Include')
-rw-r--r-- | Include/unicodeobject.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 6645782..0531aed 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -185,11 +185,12 @@ typedef PY_UNICODE_TYPE Py_UNICODE; # define PyUnicode_GetSize PyUnicodeUCS2_GetSize # define PyUnicode_Join PyUnicodeUCS2_Join # define PyUnicode_Partition PyUnicodeUCS2_Partition +# define PyUnicode_RPartition PyUnicodeUCS2_RPartition +# define PyUnicode_RSplit PyUnicodeUCS2_RSplit # define PyUnicode_Replace PyUnicodeUCS2_Replace # define PyUnicode_Resize PyUnicodeUCS2_Resize # define PyUnicode_SetDefaultEncoding PyUnicodeUCS2_SetDefaultEncoding # define PyUnicode_Split PyUnicodeUCS2_Split -# define PyUnicode_RSplit PyUnicodeUCS2_RSplit # define PyUnicode_Splitlines PyUnicodeUCS2_Splitlines # define PyUnicode_Tailmatch PyUnicodeUCS2_Tailmatch # define PyUnicode_Translate PyUnicodeUCS2_Translate @@ -261,6 +262,8 @@ typedef PY_UNICODE_TYPE Py_UNICODE; # define PyUnicode_GetSize PyUnicodeUCS4_GetSize # define PyUnicode_Join PyUnicodeUCS4_Join # define PyUnicode_Partition PyUnicodeUCS4_Partition +# define PyUnicode_RPartition PyUnicodeUCS4_RPartition +# define PyUnicode_RSplit PyUnicodeUCS4_RSplit # define PyUnicode_Replace PyUnicodeUCS4_Replace # define PyUnicode_Resize PyUnicodeUCS4_Resize # define PyUnicode_SetDefaultEncoding PyUnicodeUCS4_SetDefaultEncoding @@ -1027,6 +1030,14 @@ PyAPI_FUNC(PyObject*) PyUnicode_Partition( PyObject *sep /* String separator */ ); +/* Partition a string using a given separator, searching from the end of the + string. */ + +PyAPI_FUNC(PyObject*) PyUnicode_RPartition( + 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 |