Message140796
I think it would be better to use this code:
if (!Py_UNICODE_ISUPPER(*s)) {
*s = Py_UNICODE_TOUPPER(*s);
status = 1;
}
s++;
while (--len > 0) {
if (Py_UNICODE_ISLOWER(*s)) {
*s = Py_UNICODE_TOLOWER(*s);
status = 1;
}
s++;
}
Since this actually implements what the doc-string says.
Note that title case is not the same as upper case. Title case is
a special case that get's applied when using a string as a title
of a text and may well include characters that are lower case
but which are only used in titles. |
|
Date |
User |
Action |
Args |
2011-07-21 08:34:22 | lemburg | set | recipients:
+ lemburg, belopolsky, ezio.melotti, eric.araujo, r.david.murray, py.user |
2011-07-21 08:34:22 | lemburg | link | issue12266 messages |
2011-07-21 08:34:22 | lemburg | create | |
|