parameters: (self, haystack, needle)
docstring: :type haystack: str
          :type needle: str
          :rtype: int
docstring_summary: :type haystack: str
          :type needle: str
          :rtype: int
docstring_tokens: : type haystack : str : type needle : str : rtype : int
function: def strStr(self, haystack, needle):
          """
          :type haystack: str
          :type needle: str
          :rtype: int
          """
          if not needle:
              return 0
          lst = haystack.split(needle)
          if len(lst) == 1:
              return -1
          else:
              return len(lst[0])
function_tokens: def strStr ( self , haystack , needle ) : if not needle : return 0 lst = haystack . split ( needle ) if len ( lst ) == 1 : return - 1 else : return len ( lst [ 0 ] )