0

Is there a faster way to make a case-insensitive search for substring, other than the obvious

subtext.lower() in text.lower()

I work on small texts. Specifically, titles.

  • 5
    What's wrong with that method? Have you profiled your code and indicated that line is your bottleneck? If not, don't worry about premature optimization. – Cory Kramer Mar 18 '18 at 18:17
  • 1
    in this answer some different methods of performing this operation was profiled and it seems that this is fastests solution: https://stackoverflow.com/a/4901653/5687152 – mabe02 Mar 18 '18 at 18:38

0 Answers0