Constant-time equal function on string
