Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1d1e1dba
Commit
1d1e1dba
authored
Jun 20, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected return type and value information for PyUnicode_Count() and
PyUnicode_Find(). This closes SF bug #566631.
parent
ba3ff1ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
Doc/api/concrete.tex
Doc/api/concrete.tex
+18
-14
Doc/api/refcounts.dat
Doc/api/refcounts.dat
+2
-2
No files found.
Doc/api/concrete.tex
View file @
1d1e1dba
...
...
@@ -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,
...
...
Doc/api/refcounts.dat
View file @
1d1e1dba
...
...
@@ -1393,14 +1393,14 @@ PyUnicode_Tailmatch:int:start::
PyUnicode_Tailmatch:int:end::
PyUnicode_Tailmatch:int:direction::
PyUnicode_Find:
PyObject*::+1
:
PyUnicode_Find:
int::
:
PyUnicode_Find:PyObject*:str:0:
PyUnicode_Find:PyObject*:substr:0:
PyUnicode_Find:int:start::
PyUnicode_Find:int:end::
PyUnicode_Find:int:direction::
PyUnicode_Count:
PyObject*::+1
:
PyUnicode_Count:
int::
:
PyUnicode_Count:PyObject*:str:0:
PyUnicode_Count:PyObject*:substr:0:
PyUnicode_Count:int:start::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment