 
   """
   @spec valid_codepoint?(codepoint) :: boolean
-  def valid_codepoint?(cp), do: match?(<<_ :: utf8>>, cp)
+  def valid_codepoint?(<<_ :: utf8>>), do: true
+  def valid_codepoint?(_), do: false
 
   @doc """
   Returns unicode graphemes in the string

  end

  @doc """
  Returns a list with codepoints from an utf8 string.

  ## Examples



  @doc """
  Returns a new binary based on `subject` by replacing the parts
  matching `pattern` for `replacement`. By default, it replaces
  all entries, except if `global: false` is given as option.

  If the replaced part must be used in `replacement`, then the
  position or the positions where it is to be inserted must be
  specified by using the option `insert_replaced`.

  ## Examples

