def SearchInCurrentBuffer(pattern):
 return GetIntValue(u"search('{0}', 'Wcnb')".format(EscapeForVim(pattern)))

def SearchInCurrentBuffer ( pattern ) : return GetIntValue ( u"search('{0}', 'Wcnb')" . format ( EscapeForVim ( pattern ) ) )
returns the 1-indexed line on which the pattern matches or 0 if not found .