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
94303549
Commit
94303549
authored
Jan 18, 2012
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve casefold/lower/upper docs
parent
391166fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+18
-2
No files found.
Doc/library/stdtypes.rst
View file @
94303549
...
...
@@ -1005,7 +1005,16 @@ functions based on regular expressions.
.. method:: str.casefold()
Return a casefolded copy of the string. Casefolded strings may be used for
caseless matching. For example, ``"MASSE".casefold() == "maße".casefold()``.
caseless matching.
Casefolding is similar to lowercasing but more aggressive because it is
intended to remove all case distinctions in a string. For example, the German
lowercase letter ``'ß'`` is equivalent to ``"ss"``. Since it is already
lowercase, :meth:`lower` would do nothing to ``'ß'``; :meth:`casefold`
converts it to ``"ss"``.
The casefolding algorithm is described in section 3.13 of the Unicode
Standard.
.. versionadded:: 3.3
...
...
@@ -1217,6 +1226,9 @@ functions based on regular expressions.
Return a copy of the string with all the cased characters [4]_ converted to
lowercase.
The lowercasing algorithm used is described in section 3.13 of the Unicode
Standard.
.. method:: str.lstrip([chars])
...
...
@@ -1420,7 +1432,11 @@ functions based on regular expressions.
Return a copy of the string with all the cased characters [4]_ converted to
uppercase. Note that ``str.upper().isupper()`` might be ``False`` if ``s``
contains uncased characters or if the Unicode category of the resulting
character(s) is not "Lu" (Letter, uppercase), but e.g. "Lt" (Letter, titlecase).
character(s) is not "Lu" (Letter, uppercase), but e.g. "Lt" (Letter,
titlecase).
The uppercasing algorithm used is described in section 3.13 of the Unicode
Standard.
.. method:: str.zfill(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