Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
edf368c3
Kaydet (Commit)
edf368c3
authored
Eki 18, 2002
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make lower/upper/title work for non-BMP characters.
üst
ddc369a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
unicodectype.c
Objects/unicodectype.c
+15
-24
No files found.
Objects/unicodectype.c
Dosyayı görüntüle @
edf368c3
...
...
@@ -62,18 +62,17 @@ int _PyUnicode_IsLinebreak(Py_UNICODE ch)
Py_UNICODE
_PyUnicode_ToTitlecase
(
register
Py_UNICODE
ch
)
{
const
_PyUnicode_TypeRecord
*
ctype
=
gettyperecord
(
ch
);
int
delta
;
if
(
ctype
->
title
)
ch
+
=
ctype
->
title
;
delta
=
ctype
->
title
;
else
ch
+
=
ctype
->
upper
;
delta
=
ctype
->
upper
;
#ifdef Py_UNICODE_WIDE
/* The database assumes that the values wrap around at 0x10000. */
if
(
ch
>
0x10000
)
ch
-=
0x10000
;
#endif
return
ch
;
if
(
delta
>=
32768
)
delta
-=
65536
;
return
ch
+
delta
;
}
/* Returns 1 for Unicode characters having the category 'Lt', 0
...
...
@@ -358,14 +357,10 @@ int _PyUnicode_IsUppercase(Py_UNICODE ch)
Py_UNICODE
_PyUnicode_ToUppercase
(
Py_UNICODE
ch
)
{
const
_PyUnicode_TypeRecord
*
ctype
=
gettyperecord
(
ch
);
ch
+=
ctype
->
upper
;
#ifdef Py_UNICODE_WIDE
/* The database assumes that the values wrap around at 0x10000. */
if
(
ch
>
0x10000
)
ch
-=
0x10000
;
#endif
return
ch
;
int
delta
=
ctype
->
upper
;
if
(
delta
>=
32768
)
delta
-=
65536
;
return
ch
+
delta
;
}
/* Returns the lowercase Unicode characters corresponding to ch or just
...
...
@@ -374,14 +369,10 @@ Py_UNICODE _PyUnicode_ToUppercase(Py_UNICODE ch)
Py_UNICODE
_PyUnicode_ToLowercase
(
Py_UNICODE
ch
)
{
const
_PyUnicode_TypeRecord
*
ctype
=
gettyperecord
(
ch
);
ch
+=
ctype
->
lower
;
#ifdef Py_UNICODE_WIDE
/* The database assumes that the values wrap around at 0x10000. */
if
(
ch
>
0x10000
)
ch
-=
0x10000
;
#endif
return
ch
;
int
delta
=
ctype
->
lower
;
if
(
delta
>=
32768
)
delta
-=
65536
;
return
ch
+
delta
;
}
/* Returns 1 for Unicode characters having the category 'Ll', 'Lu', 'Lt',
...
...
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