/opt/imh/python3.13/lib/python3.13/importlib/metadata/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/importlib/metadata/__pycache__/_text.cpython-313.pyc (3772B)
ev . S SK r SSKJr " S S\5 rg) N )method_cachec v ^ \ rS rSrSrS rS rS rS rS r U 4S jr
S r\U 4S
j5 r
S rSS jrS
rU =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 UR 5 : $ Nlowerselfothers >/opt/imh/python3.13/lib/python3.13/importlib/metadata/_text.py__lt__FoldedCase.__lt__C zz|ekkm++ c D U R 5 UR 5 : $ r r
r s r __gt__FoldedCase.__gt__F r r c D U R 5 UR 5 :H $ r r
r s r __eq__FoldedCase.__eq__I zz|u{{},,r c D U R 5 UR 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 > [ TU ] 5 R UR 5 5 $ r )superr __contains__)r
r __class__s r r$ FoldedCase.__contains__R s w}++EKKM::r c U [ U5 ; $ )zDoes self appear in other?)r r s r in_FoldedCase.in_U s z%(((r c > [ TU ] 5 $ r )r# r )r
r% s r r FoldedCase.lowerZ s w}r c \ U R 5 R UR 5 5 $ r )r index)r
subs r r- FoldedCase.index^ s zz|!!#))+..r c [ R " [ R " U5 [ R 5 nUR X5 $ r )recompileescapeIsplit)r
splittermaxsplitpatterns r r5 FoldedCase.splita s. **RYYx0"$$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 9v,,--";)
/- -r r )r1
_functoolsr strr r: r r
rE s $\- \-r