o
    ڹi,                     @  s   d Z ddlmZ ddd	Zd
S )z3Binary search function for Unicode interval tables.    )annotationsucsinttabletuple[tuple[int, int], ...]returnc                 C  s   d}t |d }| |d d k s| || d krdS ||krD|| d }| || d kr1|d }n| || d k r>|d }ndS ||ksdS )a  
    Binary search in interval table.

    :param ucs: Ordinal value of unicode character.
    :param table: Tuple of starting and ending ranges of ordinal values,
        in form of ``((start, end), ...)``.
    :returns: 1 if ordinal value ucs is found within lookup table, else 0.
    r         )len)r   r   lbounduboundmid r   M/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/wcwidth/bisearch.pybisearch   s   	 

	r   N)r   r   r   r   r   r   )__doc__
__future__r   r   r   r   r   r   <module>   s    