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
a466092f
Commit
a466092f
authored
Apr 13, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the optional argument to the .strip(), .rstrip(), .strip() string
methods. Part of SF feature #444708.
parent
4a6b68ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
Doc/lib/libstdtypes.tex
Doc/lib/libstdtypes.tex
+20
-8
No files found.
Doc/lib/libstdtypes.tex
View file @
a466092f
...
...
@@ -603,8 +603,12 @@ Padding is done using spaces. The original string is returned if
Return a copy of the string converted to lowercase.
\end{methoddesc}
\begin{methoddesc}
[string]
{
lstrip
}{}
Return a copy of the string with leading whitespace removed.
\begin{methoddesc}
[string]
{
lstrip
}{
\optional
{
chars
}}
Return a copy of the string with leading characters removed. If
\var
{
chars
}
is omitted or
\code
{
None
}
, whitespace characters are
removed. If given and not
\code
{
None
}
,
\var
{
chars
}
must be a string;
the characters in the string will be stripped from the beginning of
the string this method is called on.
\end{methoddesc}
\begin{methoddesc}
[string]
{
replace
}{
old, new
\optional
{
, maxsplit
}}
...
...
@@ -632,8 +636,12 @@ Padding is done using spaces. The original string is returned if
\var
{
width
}
is less than
\code
{
len(
\var
{
s
}
)
}
.
\end{methoddesc}
\begin{methoddesc}
[string]
{
rstrip
}{}
Return a copy of the string with trailing whitespace removed.
\begin{methoddesc}
[string]
{
rstrip
}{
\optional
{
chars
}}
Return a copy of the string with trailing characters removed. If
\var
{
chars
}
is omitted or
\code
{
None
}
, whitespace characters are
removed. If given and not
\code
{
None
}
,
\var
{
chars
}
must be a string;
the characters in the string will be stripped from the end of the
string this method is called on.
\end{methoddesc}
\begin{methoddesc}
[string]
{
split
}{
\optional
{
sep
\optional
{
,maxsplit
}}}
...
...
@@ -649,16 +657,20 @@ boundaries. Line breaks are not included in the resulting list unless
\var
{
keepends
}
is given and true.
\end{methoddesc}
\begin{methoddesc}
[string]
{
startswith
}{
prefix
\optional
{
, start
\optional
{
, end
}}}
\begin{methoddesc}
[string]
{
startswith
}{
prefix
\optional
{
,
start
\optional
{
, end
}}}
Return true if string starts with the
\var
{
prefix
}
, otherwise
return false. With optional
\var
{
start
}
, test string beginning at
that position. With optional
\var
{
end
}
, stop comparing string at that
position.
\end{methoddesc}
\begin{methoddesc}
[string]
{
strip
}{}
Return a copy of the string with leading and trailing whitespace
removed.
\begin{methoddesc}
[string]
{
strip
}{
\optional
{
chars
}}
Return a copy of the string with leading and trailing characters
removed. If
\var
{
chars
}
is omitted or
\code
{
None
}
, whitespace
characters are removed. If given and not
\code
{
None
}
,
\var
{
chars
}
must be a string; the characters in the string will be stripped from
the both ends of the string this method is called on.
\end{methoddesc}
\begin{methoddesc}
[string]
{
swapcase
}{}
...
...
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