Add slice method for string comparition