Case-insensitive string equality
Tim Chase
python.list at tim.thechases.com
Thu Aug 31 20:38:45 EDT 2017
On 2017-09-01 00:53, MRAB wrote:
> What would you expect the result would be for:
>
>>> "\N{LATIN SMALL LIGATURE FI}".case_insensitive_find("F")
0
>>> "\N{LATIN SMALL LIGATURE FI}".case_insensitive_find("I)
0.5
>>> "\N{LATIN SMALL LIGATURE FFI}".case_insensitive_find("I)
0.66666666666666666
;-)
(mostly joking, but those are good additional tests to consider)
-tkc
More information about the Python-list
mailing list