
    hv                     .    S SK r SSKJr   " S S\5      rg)    N   )method_cachec                   v   ^  \ rS rSrSrS rS rS rS rS r	U 4S jr
S	 r\U 4S
 j5       rS rSS jrSrU =r$ )
FoldedCase   a  
A case insensitive string class; behaves just like str
except compares equal when the only variation is case.

>>> s = FoldedCase('hello world')

>>> s == 'Hello World'
True

>>> 'Hello World' == s
True

>>> s != 'Hello World'
False

>>> s.index('O')
4

>>> s.split('O')
['hell', ' w', 'rld']

>>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
['alpha', 'Beta', 'GAMMA']

Sequence membership is straightforward.

>>> "Hello World" in [s]
True
>>> s in ["Hello World"]
True

You may test for set inclusion, but candidate and elements
must both be folded.

>>> FoldedCase("Hello World") in {s}
True
>>> s in {FoldedCase("Hello World")}
True

String inclusion works as long as the FoldedCase object
is on the right.

>>> "hello" in FoldedCase("Hello World")
True

But not if the FoldedCase object is on the left:

>>> FoldedCase('hello') in 'Hello World'
False

In that case, use in_:

>>> FoldedCase('hello').in_('Hello World')
True

>>> FoldedCase('hello') > FoldedCase('Hello')
False
c                 D    U R                  5       UR                  5       :  $ Nlowerselfothers     P/var/www/auris/envauris/lib/python3.13/site-packages/importlib_metadata/_text.py__lt__FoldedCase.__lt__C       zz|ekkm++    c                 D    U R                  5       UR                  5       :  $ r	   r
   r   s     r   __gt__FoldedCase.__gt__F   r   r   c                 D    U R                  5       UR                  5       :H  $ r	   r
   r   s     r   __eq__FoldedCase.__eq__I       zz|u{{},,r   c                 D    U R                  5       UR                  5       :g  $ r	   r
   r   s     r   __ne__FoldedCase.__ne__L   r   r   c                 4    [        U R                  5       5      $ r	   )hashr   )r   s    r   __hash__FoldedCase.__hash__O   s    DJJL!!r   c                 Z   > [         TU ]  5       R                  UR                  5       5      $ r	   )superr   __contains__)r   r   	__class__s     r   r$   FoldedCase.__contains__R   s     w}++EKKM::r   c                     U [        U5      ;   $ )zDoes self appear in other?)r   r   s     r   in_FoldedCase.in_U   s    z%(((r   c                     > [         TU ]  5       $ r	   )r#   r   )r   r%   s    r   r   FoldedCase.lowerZ   s    w}r   c                 \    U R                  5       R                  UR                  5       5      $ r	   )r   index)r   subs     r   r-   FoldedCase.index^   s    zz|!!#))+..r   c                     [         R                  " [         R                  " U5      [         R                  5      nUR	                  X5      $ r	   )recompileescapeIsplit)r   splittermaxsplitpatterns       r   r5   FoldedCase.splita   s.    **RYYx0"$$7}}T,,r    ) r   )__name__
__module____qualname____firstlineno____doc__r   r   r   r   r    r$   r(   r   r   r-   r5   __static_attributes____classcell__)r%   s   @r   r   r      sO    9v,,--";)
  /- -r   r   )r1   
_functoolsr   strr   r:   r   r   <module>rE      s    	 $\- \-r   