[Python-checkins] r73296 - python/trunk/Doc/library/string.rst
georg.brandl
python-checkins at python.org
Mon Jun 8 18:03:41 CEST 2009
Author: georg.brandl
Date: Mon Jun 8 18:03:41 2009
New Revision: 73296
Log:
#6238: add fillchar to string.just function family.
Modified:
python/trunk/Doc/library/string.rst
Modified: python/trunk/Doc/library/string.rst
==============================================================================
--- python/trunk/Doc/library/string.rst (original)
+++ python/trunk/Doc/library/string.rst Mon Jun 8 18:03:41 2009
@@ -829,14 +829,15 @@
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)
More information about the Python-checkins
mailing list