def getTokenEnd(characterIndex, fileText, token):
 tokenIndex = fileText.find(token, characterIndex)
 if (tokenIndex == (-1)):
  return (-1)
 return (tokenIndex + len(token))

def getTokenEnd ( characterIndex , fileText , token ) : tokenIndex = fileText . find ( token , characterIndex ) if ( tokenIndex == ( - 1 ) ) : return ( - 1 ) return ( tokenIndex + len ( token ) )
get the token end index for the file text and token .