a
     ³ŠaË  ã                   @   s   d Z ddlmZ dd„ ZdS )zQString compatibility.é    )ÚPY2c                 C   s>   t rt| ƒS |  d¡}t|ƒd }|dd… dv r:|d8 }|S )zP
    Tries to compute what the length of an utf16-encoded QString would be.
    Úutf16é   N)s   ÿþs   ÿÿs   þÿé   )r   ÚlenÚencode)ÚtextZ
utf16_textZlength© r	   ú:lib/python3.9/site-packages/spyder/utils/qstringhelpers.pyÚqstring_length   s    
r   N)Ú__doc__Zspyder.py3compatr   r   r	   r	   r	   r
   Ú<module>   s   