I am trying to find a utf-8 substring in a string.
Here is my code:
str = u'haha i am going home'
substr1 = u'haha'
substr2 = u'ha'
if i run
str.find(substr1) #returns 0
str.find(substr2) #returns 0
I would like
str.find(substr2) to return -1
instead as there i want to match by word instead.