Closed saru2020 closed 5 years ago
You have the arguments the other way around.
Your pattern is the first argument, and the string you are searching in is your second.
See here for reference.
@krisk The same bug happens randomly for me when the pattern is longer than the string (which happens often in my case but works fine most of the time). Should I prevent such usecase in my code? O is there going to be a release that will handle this case?
Hi,
Is there any reason why the below line of string comparison would lead to a crash?
Any help would be appreciated. Thanks!