diff options
author | Fred Drake <fdrake@acm.org> | 2002-06-20 22:07:04 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-06-20 22:07:04 (GMT) |
commit | 1d1e1dba12d48d6d93b09e4bd140962b4c110dfb (patch) | |
tree | 9c7307b391982ef5555a3166949b7632847d0e5d /Doc/api/concrete.tex | |
parent | ba3ff1ba7ba9b3920bafc1722c62b8abdb77b93c (diff) | |
download | cpython-1d1e1dba12d48d6d93b09e4bd140962b4c110dfb.zip cpython-1d1e1dba12d48d6d93b09e4bd140962b4c110dfb.tar.gz cpython-1d1e1dba12d48d6d93b09e4bd140962b4c110dfb.tar.bz2 |
Corrected return type and value information for PyUnicode_Count() and
PyUnicode_Find().
This closes SF bug #566631.
Diffstat (limited to 'Doc/api/concrete.tex')
-rw-r--r-- | Doc/api/concrete.tex | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index 2face20..bf4456a 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -1325,23 +1325,27 @@ They all return \NULL{} or \code{-1} if an exception occurs. match, \var{direction} == 1 a suffix match), 0 otherwise. \end{cfuncdesc} -\begin{cfuncdesc}{PyObject*}{PyUnicode_Find}{PyObject *str, - PyObject *substr, - int start, - int end, - int direction} +\begin{cfuncdesc}{int}{PyUnicode_Find}{PyObject *str, + PyObject *substr, + int start, + int end, + int direction} Return the first position of \var{substr} in \var{str}[\var{start}:\var{end}] using the given \var{direction} (\var{direction} == 1 means to do a forward search, - \var{direction} == -1 a backward search), 0 otherwise. -\end{cfuncdesc} - -\begin{cfuncdesc}{PyObject*}{PyUnicode_Count}{PyObject *str, - PyObject *substr, - int start, - int end} - Count the number of occurrences of \var{substr} in - \var{str}[\var{start}:\var{end}] + \var{direction} == -1 a backward search). The return value is the + index of the first match; a value of \code{-1} indicates that no + match was found, and \code{-2} indicates that an error occurred and + an exception has been set. +\end{cfuncdesc} + +\begin{cfuncdesc}{int}{PyUnicode_Count}{PyObject *str, + PyObject *substr, + int start, + int end} + Return the number of non-overlapping occurrences of \var{substr} in + \code{\var{str}[\var{start}:\var{end}]}. Returns \code{-1} if an + error occurred. \end{cfuncdesc} \begin{cfuncdesc}{PyObject*}{PyUnicode_Replace}{PyObject *str, |