Update string comparison for * to a faster comparison operator, and move comparison above exploding the string