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
2cc39ad2
Commit
2cc39ad2
authored
Jun 08, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#6238: add fillchar to string.just function family.
parent
e590d57d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Doc/library/string.rst
Doc/library/string.rst
+6
-5
No files found.
Doc/library/string.rst
View file @
2cc39ad2
...
...
@@ -829,14 +829,15 @@ not be removed until Python 3.0. The functions defined in this module are:
Return a copy of *s*, but with lower case letters converted to upper case.
.. function:: ljust(s, width)
rjust(s, width)
center(s, width)
.. function:: ljust(s, width
[, fillchar]
)
rjust(s, width
[, fillchar]
)
center(s, width
[, fillchar]
)
These functions respectively left-justify, right-justify and center a string in
a field of given width. They return a string that is at least *width*
characters wide, created by padding the string *s* with spaces until the given
width on the right, left or both sides. The string is never truncated.
characters wide, created by padding the string *s* with the character *fillchar*
(default is a space) until the given width on the right, left or both sides.
The string is never truncated.
.. function:: zfill(s, width)
...
...
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