@@ -310,7 +310,8 @@ These APIs can be used for fast direct character conversions:
310
310
.. c:function:: Py_ssize_t PyUnicode_ToLower(Py_UCS4 ch, Py_UCS4 *buffer, int size)
311
311
312
312
Convert *ch * to lower case, store result in *buffer *, which should be
313
- able to hold as many characters needed for *ch * to be lower cased, and
313
+ able to hold as many characters needed for *ch * to be lower cased
314
+ (e.g. a maximum of two character for Unicode 16.0), and
314
315
return the number of characters stored. Passing a ``NULL`` buffer returns
315
316
the buffer size needed. If at some point a buffer overflow is detected,
316
317
an :exc:`ValueError` is raised and ``-1`` is returned.
@@ -321,7 +322,8 @@ These APIs can be used for fast direct character conversions:
321
322
.. c:function:: Py_ssize_t PyUnicode_ToUpper(Py_UCS4 ch, Py_UCS4 *buffer, int size)
322
323
323
324
Convert *ch * to upper case, store result in *buffer *, which should be
324
- able to hold as many characters needed for *ch * to be upper cased, and
325
+ able to hold as many characters needed for *ch * to be upper cased
326
+ (e.g. a maximum of three character for Unicode 16.0), and
325
327
return the number of characters stored. Passing a ``NULL`` buffer returns
326
328
the buffer size needed. If at some point a buffer overflow is detected,
327
329
an :exc:`ValueError` is raised and ``-1`` is returned.
@@ -332,7 +334,8 @@ These APIs can be used for fast direct character conversions:
332
334
.. c:function:: Py_ssize_t PyUnicode_ToTitle(Py_UCS4 ch, Py_UCS4 *buffer, int size)
333
335
334
336
Convert *ch * to title case, store result in *buffer *, which should be
335
- able to hold as many characters needed for *ch * to be title cased, and
337
+ able to hold as many characters needed for *ch * to be title cased
338
+ (e.g. a maximum of three character for Unicode 16.0), and
336
339
return the number of characters stored. Passing a ``NULL`` buffer returns
337
340
the buffer size needed. If at some point a buffer overflow is detected,
338
341
an :exc:`ValueError` is raised and ``-1`` is returned.
@@ -343,7 +346,8 @@ These APIs can be used for fast direct character conversions:
343
346
.. c:function:: Py_ssize_t PyUnicode_ToFolded(Py_UCS4 ch, Py_UCS4 *buffer, int size)
344
347
345
348
Foldcase *ch *, store result in *buffer *, which should be
346
- able to hold as many characters needed for *ch * to be foldcased, and
349
+ able to hold as many characters needed for *ch * to be foldcased
350
+ (e.g. a maximum of three character for Unicode 16.0), and
347
351
return the number of characters stored. Passing a ``NULL`` buffer returns
348
352
the buffer size needed. If at some point a buffer overflow is detected,
349
353
an :exc:`ValueError` is raised and ``-1`` is returned.
0 commit comments