Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_wcswidth.cpython-313.pyc54 linesDownload Raw Back to __pycache__
1�

2��j[���SrSSKJr SSKJr SSKJr SSKJr SSKJ	r	J3r4JrJrJ
r
 SSKJr SS	KJr SS
Sjjrg5)z.This is a python implementation of wcswidth().�)�annotations)�Optional���wcwidth)�bisearch)�_EMOJI_ZWJ_SET�_ISC_VIRAMA_SET�_CATEGORY_MC_TABLE�_FITZPATRICK_RANGE�_REGIONAL_INDICATOR_SET)�VS16_NARROW_TO_WIDE)�
ISC_CONSONANTNc�D^�Uc5UR5(a UR5(a[U5$TS:Xa[OU4SjnUc[U5OUnSnSnSnSn	Sn6SnXu:Ga�Xn[	U5n
U
S:Xa'U7(aUS-
nOUS-U:aSn8US-
nOSn9US-
nMBU
S	:Xa0US:�a*U[[	X5[S105-
nSnUS-
nMxU
S:�a�U
[;a\SnUS-11nUS:�a<[	X5[;a'US-
nUS-nUS:�a[	X5[;aM'US-S:Xa	U
n	US-
nM�O0[SU
s=::a
[S::aO OU	[;aUS-
nGMU12(a%[U
[5(aUnU
n	Sn13SnUS-
nGM@U"U5nUS:agUS:�aU(aUS-
nSnUU-
nUnU
n	Sn14O0US:�a![U
[5(aUS-
nSnSn15SnO	U
[;n16US-
nXu:aGM�U(aUS-
nU$)
a�17Given a unicode string, return its printable length on a terminal.18 19See :ref:`Specification` for details of cell measurement.20 21This implementation differs from Markus Khun's original POSIX C implementation, in that this22``wcswidth()`` processes graphemes strings yielded by :func:`wcwidth.iter_graphemes` defined by23`Unicode Standard Annex #29`_. POSIX wcswidth(3) is not grapheme-aware and does not measure many24kinds of Emojis or complex scripts correctly.25 26:param pwcs: Measure width of given unicode string.27:param n: When ``n`` is None (default), return the length of the entire28    string, otherwise only the first ``n`` characters are measured.29 30:param unicode_version: Ignored. Retained for backwards compatibility.31 32    .. deprecated:: 0.3.033       Only the latest Unicode version is now shipped.34 35:param ambiguous_width: Width to use for East Asian Ambiguous (A)36    characters. Default is ``1`` (narrow). Set to ``2`` for CJK contexts.37:returns: The width, in cells, needed to display the first ``n`` characters38    of the unicode string ``pwcs``.  Returns ``-1`` for C0 and C1 control39    characters!40 41.. _`Unicode Standard Annex #29`: https://www.unicode.org/reports/tr29/42rc�>�[UST5$)N�autor)�c�ambiguous_widths ��WD:\code\apps\devtools\python\user_packages\Python313\site-packages\wcwidth/_wcswidth.py�<lambda>�wcswidth.<locals>.<lambda>=s���g�a��Q`�>a�r����������Fi
 �i�z9.0.0i��T)
�isascii�isprintable�lenr�ordrrr
rr	rrr43)�pwcs�n�unicode_versionr�_wcwidth�end�total_width�idx�last_measured_idx�last_measured_ucs�last_was_virama�conjunct_pending�char�ucs�	ri_before�j�ws   `             r�wcswidthr0s����L	�y�T�\�\�^�^��(8�(8�(:�(:��4�y��*�Q�.�w�4a�H��y�#�d�)�a�C��K�44�C������O���45
�)��y���$�i���&�=���q����q��3��"'���q���"'���q�����&�=�.�!�3��8��D�+�,�#�G�,��
�K�!#���1�H�C����<��-�-��	��!�G���1�f��T�W��1H�!H���N�I���F�A��1�f��T�W��1H�!H��q�=�A�%�(+�%��1�H�C��&�%�Q�'�3�G�2D�Q�2G�G�'�>�9��q�����x��]�;�;� #�� #��#�O�#���1�H�C��
�T�N���q�5���q�5���q� ��#(� ��1��K� #�� #��#�O�
�!�
#���6H�(I�(I��1��K� "��#�O�$��!�_�4�O��q���S�)�V��q����r)Nrr)46r �strr!z
Optional[int]r"r1r�int�returnr2)�__doc__�47__future__r�typingrr#rr�48_constantsr	r49rrr
�50table_vs16r�table_graphemerr0�rr�<module>r;sl��4�"����2�2�51,�)�52�!��	C�53
�C��C��C��	C�54	�Cr
codekingpro/portable-devtools · Team Ai